improve alwayscommit=false mode

Now changes are staged into the branch's index, but not committed,
which avoids growing a large journal. And sync and merge always
explicitly commit, ensuring that even when they do nothing else,
they commit the staged changes.

Added a flag file to indicate that the branch's journal contains
uncommitted changes. (Could use git ls-files, but don't want to run
that every time.)

In the future, this ability to have uncommitted changes staged in the
journal might be used on remotes after a series of oneshot commands.
This commit is contained in:
Joey Hess 2012-02-25 16:11:47 -04:00
commit 1f73db3469
6 changed files with 44 additions and 7 deletions

2
debian/changelog vendored
View file

@ -37,7 +37,7 @@ git-annex (3.20120124) UNRELEASED; urgency=low
a remote's location log.
* To avoid commits of data to the git-annex branch after each command
is run, set annex.alwayscommit=false. Its data will then be committed
less frequently, when a merge or sync is done.
less frequently, when a merge or sync is done.
-- Joey Hess <joeyh@debian.org> Tue, 24 Jan 2012 16:21:55 -0400