Support locking (and unlocking) a .git/index through DirCache
commit2ed812a86405d1c56b693788afc249c3563289c0
authorShawn O. Pearce <spearce@spearce.org>
Tue, 12 Aug 2008 01:07:55 +0000 (11 18:07 -0700)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Thu, 14 Aug 2008 17:33:19 +0000 (14 19:33 +0200)
tree951412678edbeee47d66527b5277428cc224c1a1
parent0043dac636d8fe3b5e8995c2f7d96ba972d58bb8
Support locking (and unlocking) a .git/index through DirCache

In order to safely perform an update of the .git/index file (or any
other DirCache file) we need to lock the file prior to reading its
contents into memory.  This ensures that the contents will not be
modified between the time we start processing the entires and when
the update operation is completed.

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