generate more compact git-annex branch for imports

Especially from borg, where the content identifier logs
all end up being the same identical file!

But also, for other imports, the location tracking logs can,
in some cases, be identical files.

Bonus optimisation: Avoid looking up (and parsing when set)
GIT_ANNEX_VECTOR_CLOCK env var every time a log is written to.
Although the lookup does happen at startup even when no
log will be written now.
This commit is contained in:
Joey Hess 2020-12-23 15:21:33 -04:00
parent f8aadbfb9b
commit 6280af2901
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
26 changed files with 133 additions and 49 deletions

View file

@ -35,7 +35,7 @@ seek = commandAction . start
start :: ForgetOptions -> CommandStart
start o = starting "forget" ai si $ do
c <- liftIO currentVectorClock
c <- currentVectorClock
let basets = addTransition c ForgetGitHistory noTransitions
let ts = if dropDead o
then addTransition c ForgetDeadRemotes basets