summaryrefslogtreecommitdiff
path: root/Annex/Content.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Annex/Content.hs')
-rw-r--r--Annex/Content.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/Annex/Content.hs b/Annex/Content.hs
index 3a388129e..f328051e3 100644
--- a/Annex/Content.hs
+++ b/Annex/Content.hs
@@ -312,9 +312,11 @@ getKeysPresent' dir = do
saveState :: Bool -> Annex ()
saveState oneshot = do
Annex.Queue.flush False
- alwayscommit <- Git.configTrue <$> fromRepo (Git.Config.get "annex.alwayscommit" "true")
- unless (oneshot || not alwayscommit) $ do
- Annex.Branch.commit "update"
+ unless oneshot $ do
+ alwayscommit <- Git.configTrue <$> fromRepo (Git.Config.get "annex.alwayscommit" "true")
+ if alwayscommit
+ then Annex.Branch.commit "update"
+ else Annex.Branch.stage
{- Downloads content from any of a list of urls. -}
downloadUrl :: [Url.URLString] -> FilePath -> Annex Bool