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:
Joey Hess 2018-10-18 12:51:20 -04:00
parent 7625cc58ae
commit a6c8de84b6
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 106 additions and 44 deletions

View file

@ -56,7 +56,7 @@ upgrade automatic = do
{- Create adjusted branch where all files are unlocked.
- This should have the same content for each file as
- have been staged in upgradeDirectWorkTree. -}
AdjBranch b <- adjustBranch UnlockAdjustment cur
AdjBranch b <- adjustBranch (LinkAdjustment UnlockAdjustment) cur
{- Since the work tree was already set up by
- upgradeDirectWorkTree, and contains unlocked file
- contents too, don't use git checkout to check out the