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>