fetch: genericize git-svn fetch packing mechanism
When git-svn fetches new commits, they are created as loose objects.
Since
e6013a109c84a7b6 (gc.sh: combine loose git-svn fetch objects
into a pack, 2016-06-01), Girocco has had a mechanism to combine the
loose objects created by a git-svn fetch into a pack without doing
a full garbage collection.
However, there are other fetch strategies that can also result in
loose object creation. Most notably the non-smart HTTP fetch
process.
The mechanism used is very simple. A sentinel file is "touch"ed
before the fetch and then a `find -newer` is run after the fetch
to identify any newly fetched loose objects which are then fed
to combine-packs and finally prune-packed.
Compared to a full garbage collection this is very fast indeed.
Girocco then gains the efficiency of using less space and quicker
access to the fetched-but-no-longer-loose objects.
Now expand this mechanism to work for all fetches.
Not just non-smart HTTP fetches, but ANY mirror/clone fetch that
results in new loose objects will now benefit from the auto-packing.
Not only does this cover git-svn and non-smart HTTP, it also covers
any other non-Git fetch mechanisms that may be in use (perhaps
courtesy of administrator intervention to set a non-standard baseurl).
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>