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:
parent
9f27d03945
commit
090898a138
6 changed files with 54 additions and 3 deletions
|
@ -39,7 +39,8 @@ instance ReversableAdjustment Adjustment where
|
|||
|
||||
instance ReversableAdjustment LinkAdjustment where
|
||||
reverseAdjustment UnlockAdjustment = LockAdjustment
|
||||
reverseAdjustment LockAdjustment = UnlockAdjustment
|
||||
-- Keep the file locked intentionally when reversing LockAdjustment.
|
||||
reverseAdjustment LockAdjustment = LockAdjustment
|
||||
reverseAdjustment FixAdjustment = UnFixAdjustment
|
||||
reverseAdjustment UnFixAdjustment = FixAdjustment
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue