fix branch precacheing bug by checking journal
authorJoey Hess <joeyh@joeyh.name>
Wed, 21 Apr 2021 18:02:15 +0000 (14:02 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 21 Apr 2021 18:02:15 +0000 (14:02 -0400)
commit6eb3c0a6b4f329cbc3b1d93fcf69eeaab744f64e
treefd1c796c4425b53acd6388c930d5e2b52fdde444
parentb470673e50f36cc39bd2513859102c38982c620a
fix branch precacheing bug by checking journal

Fix bug caused by recent optimisations that could make git-annex not see
recently recorded status information when configured with
annex.alwayscommit=false.

When not using --all, precaching only gets triggered when the
command actually needs location logs, and so there's no speed hit there.

This is a minor speed hit for --all, because it precaches even when the
location log is not actually going to be used, and so checking the journal
is not necessary. It would have been possible to defer checking the journal
until the cache gets used. But that would complicate the usual Branch.get
code path with two different kinds of caches, and the speed hit is really
minimal. A better way to speed up --all, later, would be to avoid
precaching at all when the location log is not going to be used.
Annex/Branch.hs
CHANGELOG
CmdLine/Seek.hs