summaryrefslogtreecommitdiff
path: root/Core.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-10-14 23:52:45 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-10-14 23:52:45 -0400
commitbbbe9858fe2e83767661282f7ab8ed3470ec6568 (patch)
treebbf3eb89e7021e51a3e8aa8f7cc976ec2f8385a3 /Core.hs
parentc977b6b1f3833ed1ead9212d956d8f83a4ca9028 (diff)
avoid empty commits
Diffstat (limited to 'Core.hs')
-rw-r--r--Core.hs9
1 files changed, 6 insertions, 3 deletions
diff --git a/Core.hs b/Core.hs
index 765b1e6a7..8f1c9cc80 100644
--- a/Core.hs
+++ b/Core.hs
@@ -14,7 +14,7 @@ import qualified Annex
{- Sets up a git repo for git-annex. -}
startup :: [Flag] -> Annex ()
startup flags = do
- Annex.flagsChange flags
+ mapM (\f -> Annex.flagChange f True) flags
g <- Annex.gitRepo
liftIO $ gitAttributes g
prepUUID
@@ -23,8 +23,11 @@ startup flags = do
shutdown :: Annex ()
shutdown = do
g <- Annex.gitRepo
- liftIO $ Git.run g ["commit", "-m",
- "git-annex log update", ".git-annex"]
+ needcommit <- Annex.flagIsSet NeedCommit
+ if (needcommit)
+ then liftIO $ Git.run g ["commit", "-m",
+ "git-annex log update", ".git-annex"]
+ else return ()
{- configure git to use union merge driver on state files, if it is not
- already -}