DESCRIPTION

Prevent NPE when comparing an untracked file with the index

The compare request does not currently check whether a file is in
the index before displaying the compare editor. This causes
problems when the editor tries to ask the revision for its content
and JGit is unable to return something meaningful here because a
blob cannot actually be found. The fix is to check if an entry
actually exists in the index before trying to create a compare
editor input from it.

Change-Id: I9a1b8bd39aded3dcdeaf523b735f5fcf66f8d152

COMMENTS

author: Jaylon Avila
date: 2010-05-17 10:13:19.000000000

Uploaded patch set 2.

-------------------------------------
author: Jaylon Avila
date: 2010-05-17 10:15:37.000000000

Patch Set 2: No score

I misinterpreted the code. I think we need to warn the user here. If we cannot read the index, that is a pretty fatal operation and they need to know about it. Giving them a compare editor with blank content is not a good idea as it may give them the impression that their index is corrupted and that their staged changes have been lost.

-------------------------------------
author: Carlie Harper
date: 2010-05-18 08:50:45.000000000

Patch Set 2: Looks good to me, approved; IP review completed



-------------------------------------
author: Carlie Harper
date: 2010-05-18 08:50:49.000000000

Change has been successfully merged into the git repository.

-------------------------------------
