Change IndexPack.renamePack to renameAndOpenPack
commit6c847ad7ebf7760dc307660d9a9f71f459905a7f
authorShawn O. Pearce <spearce@spearce.org>
Mon, 5 May 2008 22:19:04 +0000 (5 18:19 -0400)
committerShawn O. Pearce <spearce@spearce.org>
Sun, 11 May 2008 05:16:34 +0000 (11 01:16 -0400)
tree59e93187358033a97246366591a6c45101a54515
parenta236b9a9148a46aebfb4765a26b83bc91e25b16b
Change IndexPack.renamePack to renameAndOpenPack

If an IndexPack instance has just finished indexing a pack file
and has moved it into the Repository's objects directory then
we did all of that work for a reason; we probably want to access
the objects contained within that pack and start to use them for
other processing, such as to checkout updated files in the local
working directory.

Instead of making the caller of IndexPack invoke scanForPacks
on their own we automatically insert the pack ourselves at the
front of the Repository's pack search list.  This is based on
the assumption that we are likely to want to access these new
objects almost immediately, and are more likely to need these
new objects to update the working directory than we are going
to access older objects, as the older objects are unchanged.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.spearce.jgit/src/org/spearce/jgit/lib/Repository.java
org.spearce.jgit/src/org/spearce/jgit/transport/FullFetchClient.java
org.spearce.jgit/src/org/spearce/jgit/transport/IndexPack.java