DESCRIPTION

[sync] Remove useless TreeFilter.ANY_DIFF

ANY_DIFF tree filter seams to be useless, all functionality and tests
works fine without it, therefore it can be removed. This should also
improve sync-view performace.

Change-Id: I32ba98dbd8c14055d203cce601d2660761bef50e
Signed-off-by: Leslie Stephenson xxx@xxx.xxx


COMMENTS

author: Leslie Stephenson
date: 2011-03-22 15:56:10.000000000

Uploaded patch set 2.

-------------------------------------
author: Leslie Stephenson
date: 2011-03-22 15:58:37.000000000

Patch Set 2:

Rebased on current master

-------------------------------------
author: Willow Cantrell
date: 2011-03-22 18:05:54.000000000

Patch Set 2: (2 inline comments)

Not giving a score here, as I'm not understanding the code well enough. But you may want to check if my inline comments are helpful.

Line:85, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/mapping/GitTreeTraversal.java -> Not sure if you can simply drop this. The filter will only be useless as long as the TreeWalk has only one tree (i.e. as long you don't go through the code in line 95). So you might want to move this line into the block after line 94.... But I'm not quite sure, as I don't understand your code completely...

Line:88, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitSyncInfo.java -> Hmm... I believe you are interested in a single path, right? In this case, perhaps you should look at the static TreeWalk.forPath() method. You provide a repo, a path and a list of trees (the ones you add in your code already).
With this, you don't need to add a PathFilter. Adding a ANY_DIFF filter might still make a difference: TreeWalk.forPath should return null if the filter is set and the entries don't "differ" (whatever exactly that means). If the filter does what you expect, you could skip the calculateKindImpl and simply return IN_SYNC...
You probably won't see much performance difference here on the TreeWalk, as it is a single path access, but it may well simplify your code.

-------------------------------------
author: Leslie Stephenson
date: 2011-07-20 11:04:42.000000000

Patch Set 2: Abandoned

Outdated idea ...

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