libgit2/libgit2 — pull request #932 by ben (2012-09-13 21:37:12+00:00)
Title: ODB: re-load packfiles on failed lookup

The old method was avoiding re-loading of packfiles by watching the mtime of the
pack directory. This causes the ODB to become stale if the directory and packfile
are written within the same clock millisecond, as when cloning a fairly small
repo.

This method tries to find the object in the cached packs, and forces a refresh when
that fails. This will cause extra stat'ing on a miss, but speeds up the success
case and avoids this race condition.