DESCRIPTION

[RFC] Added proper support for stage/unstage in staging view

Also includes I91ef02c9 fix
Still need to fix up error handling
Unstaging is broken!

Change-Id: I4377d460e19900c0686463e9038f9724d7d7783d


COMMENTS

author: Imani Waller
date: 2011-05-16 13:19:13.000000000

Uploaded patch set 3.

-------------------------------------
author: Brenden Conley
date: 2011-05-16 13:19:17.000000000

Patch Set 3:

Build Started https://hudson.eclipse.org/sandbox/job/egit.gerrit/765/ 

-------------------------------------
author: Imani Waller
date: 2011-05-16 13:21:59.000000000

Patch Set 3: I would prefer that you didn't submit this

The invalid file mode bug has been fixed.  Unstaging however seems completely broken.  When I unstage a change the index is updated to a blob which matches the working tree instead of HEAD so 'git status' doesn't see any change but the change is there in the working tree.  I'm quite confused by this behaviour and have tried a few variations of the implementation but can't find the bug.

-------------------------------------
author: Brenden Conley
date: 2011-05-16 13:26:56.000000000

Patch Set 3: Build Successful

Build Successful 
 
https://hudson.eclipse.org/sandbox/job/egit.gerrit/765/ : SUCCESS

-------------------------------------
author: Marlie Beasley
date: 2011-05-18 12:46:27.000000000

Patch Set 3: I would prefer that you didn't submit this

(3 inline comments)



Line:410, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java -> There should be a finally block to unlock the DirCache in case of error:

dirCache = repository.lockDirCache();
try {

... work with dirCache
} finally {
     dirCache.unlock();
}

Line:435, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java -> Does not work for the added use case. tw is null in this case.

Line:446, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java -> Unstaging works if you add this line: ent.setLastModified(0);
We are not sure if 0 is the right value but lastModified must be changed to indicate that working tree state and index state differ.

-------------------------------------
author: Marlie Beasley
date: 2011-05-18 13:32:19.000000000

Patch Set 3: (2 inline comments)



Line:401, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java -> Update the affected entries instead of calculating a complete IndexDiff.
See CommitDialog.getFileStatus(String path) for an example.

Line:471, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java -> Update the affected entries instead of calculating a complete IndexDiff. See CommitDialog.getFileStatus(String path) for an example.

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