]> source.dussan.org Git - jgit.git/commit
Smudge racily clean index entries by truncating length (like git.git) 42/1142/2
authorChristian Halstrick <christian.halstrick@sap.com>
Thu, 15 Jul 2010 11:36:11 +0000 (13:36 +0200)
committerChristian Halstrick <christian.halstrick@sap.com>
Tue, 20 Jul 2010 19:54:36 +0000 (21:54 +0200)
commitc98d97731b87417b196341fa63a50fffea4e123c
tree1f510837016d658521495f29baad89f19c6b4ed9
parent938943d6747bb915e89714f21388a1f1e6ca0b24
Smudge racily clean index entries by truncating length (like git.git)

To mark an entry racily clean we set its length to 0 (like native git
does). Entries which are not racily clean and have zero length can be
distinguished from racily clean entries by checking P_OBJECTID
against the SHA1 of empty content. When length is 0 and P_OBJECTID is
different from SHA1 of empty content we know the entry is marked
racily clean.

See http://dev.eclipse.org/mhonarc/lists/jgit-dev/msg00488.html

Change-Id: I689552931441ab51964b430b303160c9126b66af
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java