adjust --lock: This enters an adjusted branch where files are locked.

Straightforward, except for the issue of how to reverse LockAdjustment.

With --unlock, a commit that modifies/adds unlocked files gets reverse
adjusted to use locked files. That's fairly reasonable, I think.

But reversing --lock by unlocking all modified files feels wrong. Maybe
that's just because repositories typically seem to still have mostly
locked files in them (unless one is in an adjusted unlocked branch of
course!)

It may be that eventually how to reverse both will need to be configurable,
I don't know.
This commit is contained in:
Joey Hess 2019-09-27 14:23:25 -04:00
parent 9f27d03945
commit 090898a138
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
6 changed files with 54 additions and 3 deletions

View file

@ -26,6 +26,10 @@ linkAdjustmentParser =
( long "unlock"
<> help "unlock annexed files"
)
<|> flag' LockAdjustment
( long "lock"
<> help "lock annexed files"
)
<|> flag' FixAdjustment
( long "fix"
<> help "fix symlinks to annnexed files"