DESCRIPTION

[wip] Distinguish unchanged/deleted files in logical models

Change-Id: Iba967102da2118fcf795bdd3e4bc56c9ef8abec2
Also-by: Bernard Hawkins xxx@xxx.xxx
Signed-off-by: Maleah Marks xxx@xxx.xxx


COMMENTS

author: Maleah Marks
date: 2015-12-03 10:11:46.000000000

Uploaded patch set 7.

-------------------------------------
author: Brenden Conley
date: 2015-12-03 10:11:52.000000000

Patch Set 7:

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

-------------------------------------
author: Brenden Conley
date: 2015-12-03 10:35:22.000000000

Patch Set 7: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/7911/ : SUCCESS

-------------------------------------
author: Douglas Trujillo
date: 2016-01-03 22:13:51.000000000

Patch Set 7: Code-Review-1

(17 comments)

Line:167, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitSyncCache.java -> strange method name, why ToCache ? The method name should express what the method does/returns not how it is used.

Line:168, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitSyncCache.java -> could you use shorter variable names for local variables, I think these long names make the code harder to read

e.g. 
- resources instead of resourceToInclude
- paths instead of pathsToCache

Line:172, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitSyncCache.java -> isn't this path constant for all resources of the same synchronisation ? Then it shouldn't be recomputed for each resource

Line:87, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/ThreeWayDiffEntry.java -> why headers ?

Line:87, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/ThreeWayDiffEntry.java -> did you mean ThreeWay ?

Line:87, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/ThreeWayDiffEntry.java -> s/Converts/Convert/

Line:93, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/ThreeWayDiffEntry.java -> s/path/paths/

why is this side effect needed ?

Line:95, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/ThreeWayDiffEntry.java -> why headers ?

Line:127, org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeTest.java -> this formatting change seems unrelated

Line:237, org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeTest.java -> unchangedFileName ?

Line:274, org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeTest.java -> missing @ ?

xxx@xxx.xxx

Line:283, org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeTest.java -> s/Gets the impacted/Get the affected/

Line:305, org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeTest.java -> style nit: remove extra blank line

Line:344, org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeTest.java -> move these assertions up to line 318

Line:364, org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeTest.java -> style nit: missing braces

Line:366, org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/TestRepository.java -> s/Removes/Remove/

Line:372, org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/TestRepository.java -> I would call this removeFromIndex to distinguish git rm from git rm --cached

-------------------------------------
author: Maleah Marks
date: 2016-02-23 14:16:02.000000000

Patch Set 7:

(17 comments)

Hello Matthias,

Thank you for your review and sorry for the delay of reaction on my side, I've been unable to work on that earlier.
Here is a new patch set with fixes according to your comments. I tried to improve the ThreeWayDiffEntry.scan() method a bit, please tell me if it's ok for you.

Line:167, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitSyncCache.java -> You're right, this name is not good. What about getIncludedPaths?
I'll try that.

Line:168, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitSyncCache.java -> Done

Line:172, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitSyncCache.java -> And it isn't, unless I'm mistaken?
The for loop is just after this computation, so the repository path will only be computed once.

Line:87, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/ThreeWayDiffEntry.java -> It was copied from the javadoc on the pre-existing method scan(TreeWalk).
I'll use "instances" instead of "headers"

Line:87, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/ThreeWayDiffEntry.java -> Yes. Ill fix it on the pre-existing method too.

Line:87, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/ThreeWayDiffEntry.java -> Done

Line:93, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/ThreeWayDiffEntry.java -> We need a way to influence ThreeWayDiffEntry.scan to build a list of entries that includes entries for unchanged files, otherwise we are unable to distinguish unchanged from deleted files.
That's what the added test verifies, and it fails without this modification.

To make it more "clean", I change the parameter to directly pass the GitSynchronizeData instead of a list of strings. Please tell me if it's better from your point of view.

Line:95, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/ThreeWayDiffEntry.java -> Copied from former method. I'll propose something better (hopefully).

Line:127, org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeTest.java -> Done

Line:237, org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeTest.java -> Done

Line:274, org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeTest.java -> Done

Line:283, org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeTest.java -> Done

Line:305, org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeTest.java -> Done

Line:344, org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeTest.java -> Done

Line:364, org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeTest.java -> Done

Line:366, org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/TestRepository.java -> Done

Line:372, org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/TestRepository.java -> Done

-------------------------------------
author: Gerrit Johnathan Pham
date: 2016-03-25 23:41:35.000000000

Change has been successfully merged into the git repository by Douglas Trujillo

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