]> dgit.raspbian.org Git - git-annex.git/commit
disable journal read optimisation when alwayscommit=false
authorJoey Hess <joeyh@joeyh.name>
Wed, 15 Apr 2020 17:04:34 +0000 (13:04 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 15 Apr 2020 17:24:33 +0000 (13:24 -0400)
commit43a9808292c680613e47f931660c7a4580ea7ad7
treededcae293c90c23e9d894fa6d82c5d5659e2b1cd
parent0e4c92503e131fdd7de86b5ab27d5ada0fdc44c5
disable journal read optimisation when alwayscommit=false

The journal read optimisation in aeca7c220 later got fixed in eedd73b84
to stage and commit any files that were left in the journal by a
previous git-annex run. That's necessary for the optimisation to work
correctly. But it also meant that alwayscommit=false started committing
the previous git-annex processes journalled changes, which defeated the
purpose of the config setting entirely.

So, disable the optimisation when alwayscommit=false, leaving the
files in the journal and not committing them. See my comments on the bug
report for why this seemed the best approach.

Also fixes a problem when annex.merge-annex-branches=false and there
are changes in the journal. That config indirectly prevents committing
the journal. (Which seems a bit odd given its name, but it always has..)
So, when there were changes in the journal, perhaps left there due to
alwayscommit=false being set before, the optimisation would prevent
git-annex from reading the journal files, and it would operate with out
of date information.
Annex/Branch.hs
Annex/BranchState.hs
Assistant/Sync.hs
Assistant/Threads/Merger.hs
doc/bugs/commits_created_despite_alwayscommit__61__false_as_of_recent_change.mdwn