rename to --unlock-present and better reverse adjusting

An --unlock-present branch reverses back to a branch where
all files that get modified or renamed become locked, even if they were
originally unlocked. This is the same that reversing a --unlock branch
works, and the new name makes that commonality more clear.
This commit is contained in:
Joey Hess 2020-11-13 14:32:06 -04:00
parent 3899e216af
commit e66b7d2e1b
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
6 changed files with 42 additions and 37 deletions

View file

@ -19,7 +19,7 @@ optParser :: CmdParamsDesc -> Parser Adjustment
optParser _ =
(LinkAdjustment <$> linkAdjustmentParser)
<|> (PresenceAdjustment <$> presenceAdjustmentParser <*> maybeLinkAdjustmentParser)
<|> (LinkMissingAdjustment <$> linkMissingAdjustmentParser)
<|> (LinkPresentAdjustment <$> linkPresentAdjustmentParser)
linkAdjustmentParser :: Parser LinkAdjustment
linkAdjustmentParser =
@ -46,11 +46,11 @@ presenceAdjustmentParser =
<> help "hide annexed files whose content is not present"
)
linkMissingAdjustmentParser :: Parser LinkMissingAdjustment
linkMissingAdjustmentParser =
flag' LockMissingAdjustment
( long "lock-missing"
<> help "lock files whose content is present; unlock rest"
linkPresentAdjustmentParser :: Parser LinkPresentAdjustment
linkPresentAdjustmentParser =
flag' UnlockPresentAdjustment
( long "unlock-present"
<> help "unlock files whose content is present; lock rest"
)
seek :: Adjustment -> CommandSeek