]> source.dussan.org Git - jgit.git/commit
IndexDiff: Use isModified() when comparing index-worktree 74/2074/2
authorShawn O. Pearce <spearce@spearce.org>
Wed, 8 Dec 2010 03:08:02 +0000 (19:08 -0800)
committerShawn O. Pearce <spearce@spearce.org>
Wed, 8 Dec 2010 18:03:20 +0000 (10:03 -0800)
commita66a7d90fd4c3ec3587d2f314e785ab5bba71b6f
tree82c379ce563f3f506a2b703caaaa2c55709f3d88
parentd4bbb2e4497335993f4d24f539111dc5d3f8bbcd
IndexDiff: Use isModified() when comparing index-worktree

The isModified() is more efficient because it can skip over files that
are stat clean, without needing to scan them.

This is useful to efficently work on paths that were already staged
and thus differ between HEAD and the index, but not between the index
and the working tree.

Change-Id: I4418202e612f0571974e0898050d987c6c280966
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/IndexDiffTest.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java