fix inverted logic (fixes test fail)
Sponsored-by: Jack Hill on Patreon
This commit is contained in:
parent
6b236ca58b
commit
935330aaab
1 changed files with 7 additions and 4 deletions
|
@ -190,12 +190,12 @@ optParser mode desc = SyncOptions
|
||||||
<> help "transfer contents of annexed files in a given location"
|
<> help "transfer contents of annexed files in a given location"
|
||||||
<> metavar paramPath
|
<> metavar paramPath
|
||||||
))
|
))
|
||||||
<*> unlessmode PullMode False (switch
|
<*> whenmode PullMode False (switch
|
||||||
( long "cleanup"
|
( long "cleanup"
|
||||||
<> help "remove synced/ branches from previous sync"
|
<> help "remove synced/ branches from previous sync"
|
||||||
))
|
))
|
||||||
<*> optional parseAllOption
|
<*> optional parseAllOption
|
||||||
<*> unlessmode PushMode False (invertableSwitch "resolvemerge" True
|
<*> whenmode PushMode False (invertableSwitch "resolvemerge" True
|
||||||
( help "do not automatically resolve merge conflicts"
|
( help "do not automatically resolve merge conflicts"
|
||||||
))
|
))
|
||||||
<*> case mode of
|
<*> case mode of
|
||||||
|
@ -204,8 +204,11 @@ optParser mode desc = SyncOptions
|
||||||
<*> pure mode
|
<*> pure mode
|
||||||
where
|
where
|
||||||
unlessmode m v a
|
unlessmode m v a
|
||||||
| mode /= m = a
|
| mode /= m = pure v
|
||||||
| otherwise = pure v
|
| otherwise = a
|
||||||
|
whenmode m v a
|
||||||
|
| mode == m = pure v
|
||||||
|
| otherwise = a
|
||||||
|
|
||||||
parseUnrelatedHistoriesOption :: Parser Bool
|
parseUnrelatedHistoriesOption :: Parser Bool
|
||||||
parseUnrelatedHistoriesOption =
|
parseUnrelatedHistoriesOption =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue