From 9619f562f4a22cb9c822083d842370f9dc8f629f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 18 May 2023 14:50:05 -0400 Subject: [PATCH] fix assist to commit --- Command/Assist.hs | 8 +------- Command/Sync.hs | 12 ++++++++---- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Command/Assist.hs b/Command/Assist.hs index 1ec83c1339..aaa8ea0376 100644 --- a/Command/Assist.hs +++ b/Command/Assist.hs @@ -34,10 +34,4 @@ myseek o = startConcurrency transferStages $ do } Command.Sync.prepMerge - Command.Sync.seek' o' - where - o' - | Command.Sync.contentOption o == Nothing - && Command.Sync.noContentOption o == Nothing = - o { Command.Sync.contentOption = Just True } - | otherwise = o + Command.Sync.seek' o diff --git a/Command/Sync.hs b/Command/Sync.hs index 970fc39007..d6815618e5 100644 --- a/Command/Sync.hs +++ b/Command/Sync.hs @@ -152,10 +152,14 @@ optParser mode desc = SyncOptions ( long "not-only-annex" <> help "operate on git branches as well as annex" ) - <*> unlessmode [SyncMode] False (switch - ( long "commit" - <> help "commit changes to git" - )) + <*> case mode of + SyncMode -> switch + ( long "commit" + <> help "commit changes to git" + ) + PushMode -> pure False + PullMode -> pure False + AssistMode -> pure True <*> unlessmode [SyncMode] True (switch ( long "no-commit" <> help "avoid git commit" -- 2.30.2