handle transitions with read-only unmerged git-annex branches

Capstone to this feature. Any transitions that have been performed on an
unmerged remote ref but not on the local git-annex branch, or vice-versa
have to be applied on the fly when reading files.

Sponsored-by: Dartmouth College's Datalad project
This commit is contained in:
Joey Hess 2021-12-28 13:23:32 -04:00
parent 1291a7d86c
commit b1d719f9d2
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
9 changed files with 95 additions and 28 deletions

View file

@ -104,8 +104,7 @@ recordTransitions :: (RawFilePath -> (L.ByteString -> Builder) -> Annex ()) -> T
recordTransitions changer t = changer transitionsLog $
buildTransitions . S.union t . parseTransitionsStrictly "local"
getRefTransitions :: Git.Ref -> Annex (Git.Ref, Transitions)
getRefTransitions ref = do
ts <- parseTransitionsStrictly (fromRef ref)
getRefTransitions :: Git.Ref -> Annex Transitions
getRefTransitions ref =
parseTransitionsStrictly (fromRef ref)
<$> catFile ref transitionsLog
return (ref, ts)