aboutsummaryrefslogtreecommitdiff
path: root/Annex/Content.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-02-25 15:23:17 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-02-25 15:31:42 -0400
commitb49c0c2633d662a7c91a609aec74f95f189129ad (patch)
tree6a09c0b8689a6d9d5945cd0e97ee251088f2f20e /Annex/Content.hs
parent638741f49e1c4a52b09e6dbf83f1dfbfcbd466d4 (diff)
add annex.alwayscommit option
To avoid commits of data to the git-annex branch after each command is run, set annex.alwayscommit=false. Its data will then be committed less frequently, when a merge or sync is done.
Diffstat (limited to 'Annex/Content.hs')
-rw-r--r--Annex/Content.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Annex/Content.hs b/Annex/Content.hs
index fc5f46af9..3a388129e 100644
--- a/Annex/Content.hs
+++ b/Annex/Content.hs
@@ -32,6 +32,7 @@ import Common.Annex
import Logs.Location
import Annex.UUID
import qualified Git
+import qualified Git.Config
import qualified Annex
import qualified Annex.Queue
import qualified Annex.Branch
@@ -311,7 +312,8 @@ getKeysPresent' dir = do
saveState :: Bool -> Annex ()
saveState oneshot = do
Annex.Queue.flush False
- unless oneshot $
+ alwayscommit <- Git.configTrue <$> fromRepo (Git.Config.get "annex.alwayscommit" "true")
+ unless (oneshot || not alwayscommit) $ do
Annex.Branch.commit "update"
{- Downloads content from any of a list of urls. -}