Merge branch 'master' into streamproxy

This commit is contained in:
Joey Hess 2024-10-22 09:49:28 -04:00
commit 8baccda98f
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
37 changed files with 499 additions and 54 deletions

View file

@ -11,7 +11,7 @@ module Annex.AdjustedBranch (
Adjustment(..),
LinkAdjustment(..),
PresenceAdjustment(..),
LinkPresentAdjustment(..),
LockUnlockPresentAdjustment(..),
adjustmentHidesFiles,
adjustmentIsStable,
OrigBranch,
@ -88,11 +88,11 @@ instance AdjustTreeItem Adjustment where
adjustTreeItem p t >>= \case
Nothing -> return Nothing
Just t' -> adjustTreeItem l t'
adjustTreeItem (LinkPresentAdjustment l) t = adjustTreeItem l t
adjustTreeItem (LockUnlockPresentAdjustment l) t = adjustTreeItem l t
adjustmentIsStable (LinkAdjustment l) = adjustmentIsStable l
adjustmentIsStable (PresenceAdjustment p _) = adjustmentIsStable p
adjustmentIsStable (LinkPresentAdjustment l) = adjustmentIsStable l
adjustmentIsStable (LockUnlockPresentAdjustment l) = adjustmentIsStable l
instance AdjustTreeItem LinkAdjustment where
adjustTreeItem UnlockAdjustment =
@ -115,7 +115,7 @@ instance AdjustTreeItem PresenceAdjustment where
adjustmentIsStable HideMissingAdjustment = False
adjustmentIsStable ShowMissingAdjustment = True
instance AdjustTreeItem LinkPresentAdjustment where
instance AdjustTreeItem LockUnlockPresentAdjustment where
adjustTreeItem UnlockPresentAdjustment =
ifPresent adjustToPointer adjustToSymlink
adjustTreeItem LockPresentAdjustment =

View file

@ -37,7 +37,7 @@ instance SerializeAdjustment Adjustment where
serializeAdjustment p
serializeAdjustment (PresenceAdjustment p (Just l)) =
serializeAdjustment p <> "-" <> serializeAdjustment l
serializeAdjustment (LinkPresentAdjustment l) =
serializeAdjustment (LockUnlockPresentAdjustment l) =
serializeAdjustment l
deserializeAdjustment s =
(LinkAdjustment <$> deserializeAdjustment s)
@ -46,7 +46,7 @@ instance SerializeAdjustment Adjustment where
<|>
(PresenceAdjustment <$> deserializeAdjustment s <*> pure Nothing)
<|>
(LinkPresentAdjustment <$> deserializeAdjustment s)
(LockUnlockPresentAdjustment <$> deserializeAdjustment s)
where
(s1, s2) = separate' (== (fromIntegral (ord '-'))) s
@ -68,7 +68,7 @@ instance SerializeAdjustment PresenceAdjustment where
deserializeAdjustment "showmissing" = Just ShowMissingAdjustment
deserializeAdjustment _ = Nothing
instance SerializeAdjustment LinkPresentAdjustment where
instance SerializeAdjustment LockUnlockPresentAdjustment where
serializeAdjustment UnlockPresentAdjustment = "unlockpresent"
serializeAdjustment LockPresentAdjustment = "lockpresent"
deserializeAdjustment "unlockpresent" = Just UnlockPresentAdjustment

View file

@ -359,8 +359,8 @@ addUnlocked matcher mi contentpresent =
go (LinkAdjustment UnFixAdjustment) = False
go (PresenceAdjustment _ (Just la)) = go (LinkAdjustment la)
go (PresenceAdjustment _ Nothing) = False
go (LinkPresentAdjustment UnlockPresentAdjustment) = contentpresent
go (LinkPresentAdjustment LockPresentAdjustment) = False
go (LockUnlockPresentAdjustment UnlockPresentAdjustment) = contentpresent
go (LockUnlockPresentAdjustment LockPresentAdjustment) = False
{- Adds a file to the work tree for the key, and stages it in the index.
- The content of the key may be provided in a temp file, which will be

View file

@ -513,7 +513,7 @@ applyView'' mkviewedfile getfilemetadata view madj l clean conv = do
Nothing -> stagesymlink uh f k
Just (LinkAdjustment UnlockAdjustment) ->
stagepointerfile uh f k mtreeitemtype
Just (LinkPresentAdjustment UnlockPresentAdjustment) ->
Just (LockUnlockPresentAdjustment UnlockPresentAdjustment) ->
ifM (inAnnex k)
( stagepointerfile uh f k mtreeitemtype
, stagesymlink uh f k