improve types to allow combining some adjustments
Combinations like --hide-misssing --unlocked seem very useful. On the other hand, combining --fix with --unlock doesn't make sense because a file can be either unlocked or a symlink that can be fixed, but not both. Changed the serialization of HideMissingAdjustment in passing, but it has not actually been used yet so nothing will be broken. This commit was sponsored by Trenton Cronholm on Patreon.
This commit is contained in:
parent
7625cc58ae
commit
a6c8de84b6
4 changed files with 106 additions and 44 deletions
|
@ -17,16 +17,16 @@ cmd = notBareRepo $ notDirect $ noDaemonRunning $
|
|||
|
||||
optParser :: CmdParamsDesc -> Parser Adjustment
|
||||
optParser _ =
|
||||
flag' UnlockAdjustment
|
||||
flag' (LinkAdjustment UnlockAdjustment)
|
||||
( long "unlock"
|
||||
<> help "unlock annexed files"
|
||||
)
|
||||
<|> flag' FixAdjustment
|
||||
<|> flag' (LinkAdjustment FixAdjustment)
|
||||
( long "fix"
|
||||
<> help "fix symlinks to annnexed files"
|
||||
)
|
||||
{- Not ready yet
|
||||
<|> flag' HideMissingAdjustment
|
||||
<|> flag' (PresenseAdjustment HideMissingAdjustment)
|
||||
( long "hide-missing"
|
||||
<> help "omit annexed files whose content is not present"
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue