Eh, that could mean a bunch of stat calls that it would be nice
to avoid. The counter Junio (and git-gui) implements just does
a readdir(). Reasonably cheap.
Maybe just save a ".git/gc_last_auto" with the last object count
of .git/objects/17, after repacking. If the count is over the
gc.auto limit *and* is still over the limit after subtracting the
".git/gc_last_auto" value then consider that auto is required.
This way the file is only consulted if we are really thinking
about running a repack, and its only written to if we actually do
the repack. So we only take the extra penalty if we are going to
be taking a *really* big extra penalty by repacking.
--
Shawn.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html