better prevention of auto repack

Looking through the git sources (documentation is unclear),
it seems commit doesn't ever trigger git-gc, mostly fetching and merging
seems to. I cannot easily override the setting in all those places, so
instead set gc.auto in git config when initializing a repository with
the assistant.

This does mean that the user cannot set gc.auto=0 and completely avoid
repacks, as the assistant does it daily. But, it only does it after there
are 100x the default number of loose objects, so this is probably not going
to be too annoying.
This commit is contained in:
Joey Hess 2013-03-03 14:07:13 -04:00
parent cd06ede772
commit 789ca15012
4 changed files with 26 additions and 10 deletions

7
debian/changelog vendored
View file

@ -9,9 +9,10 @@ git-annex (4.20130228) UNRELEASED; urgency=low
files in direct mode repositories.
* assistant: Fix dropping content when a file is moved to an archive
directory.
* assistant: Prevent automatic commits from causing git-gc runs,
as that can make things quite slow. Instead, git-gc --auto is run
once a day. (This can be disabled by the usual gc.auto=0 setting.)
* assistant: Set gc.auto=0 when creating repositories to prevent
automatic commits from causing git-gc runs.
* assistant: If gc.auto=0, run git-gc once a day, packing loose objects
very non-aggressively.
-- Joey Hess <joeyh@debian.org> Wed, 27 Feb 2013 23:20:40 -0400