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:
parent
f8aadbfb9b
commit
6280af2901
26 changed files with 133 additions and 49 deletions
|
@ -74,7 +74,7 @@ optParser desc = MetaDataOptions
|
|||
seek :: MetaDataOptions -> CommandSeek
|
||||
seek o = case batchOption o of
|
||||
NoBatch -> do
|
||||
c <- liftIO currentVectorClock
|
||||
c <- currentVectorClock
|
||||
let ww = WarnUnmatchLsFiles
|
||||
let seeker = AnnexedFileSeeker
|
||||
{ startAction = start c o
|
||||
|
@ -188,7 +188,7 @@ startBatch (si, (i, (MetaData m))) = case i of
|
|||
, keyOptions = Nothing
|
||||
, batchOption = NoBatch
|
||||
}
|
||||
t <- liftIO currentVectorClock
|
||||
t <- currentVectorClock
|
||||
-- It would be bad if two batch mode changes used exactly
|
||||
-- the same timestamp, since the order of adds and removals
|
||||
-- of the same metadata value would then be indeterminate.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue