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>