Avoid grafting in export tree objects that are missing
They could be missing due to an interrupted git-annex at just the wrong time during a prior graft, after which the tree objects got garbage collected. Or they could be missing because of manual messing with the git-annex branch, eg resetting it to back before the graft commit. Sponsored-by: Dartmouth College's OpenNeuro project
This commit is contained in:
parent
b32c4c2e98
commit
25a6ab6f11
3 changed files with 24 additions and 3 deletions
|
@ -889,9 +889,13 @@ performTransitionsLocked jl ts neednewlocalbranch transitionedrefs = do
|
|||
return c
|
||||
where
|
||||
regraft [] c = pure c
|
||||
regraft (et:ets) c =
|
||||
prepRememberTreeish et graftpoint c
|
||||
>>= regraft ets
|
||||
regraft (et:ets) c =
|
||||
-- Verify that the tree object exists.
|
||||
catObjectDetails et >>= \case
|
||||
Just _ ->
|
||||
prepRememberTreeish et graftpoint c
|
||||
>>= regraft ets
|
||||
Nothing -> regraft ets c
|
||||
graftpoint = asTopFilePath exportTreeGraftPoint
|
||||
|
||||
checkBranchDifferences :: Git.Ref -> Annex ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue