Support writing a .git/index through DirCache
commitb363a982a6f06011f963bbe4d1881603a781ac5e
authorShawn O. Pearce <spearce@spearce.org>
Tue, 12 Aug 2008 01:07:56 +0000 (11 18:07 -0700)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Thu, 14 Aug 2008 17:33:20 +0000 (14 19:33 +0200)
tree59f4396b7fa560bfc4fcecc8aea16ddafe56a0b3
parent2ed812a86405d1c56b693788afc249c3563289c0
Support writing a .git/index through DirCache

We now support writing back the same entires we read in, with maybe
some minor entry level edits such as to change the mode of an entry,
or the assume valid flag.

We also include full support for smudging potentially 'racily clean'
entries while writing an updated index file back to disk.  We differ
from C Git in how we smudge an entry, but the effect should be the
same in that potentially racily clean entries will require C Git to
compare the content of the file, at least until Jan 19, 2038.  The
smudge rule needs to be different because we do not have access to
the working directory in order to validate a racily clean entry.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.spearce.jgit/src/org/spearce/jgit/dircache/DirCache.java
org.spearce.jgit/src/org/spearce/jgit/dircache/DirCacheEntry.java