diff options
author | Joey Hess <joey@kitenet.net> | 2010-10-14 23:52:45 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-10-14 23:52:45 -0400 |
commit | bbbe9858fe2e83767661282f7ab8ed3470ec6568 (patch) | |
tree | bbf3eb89e7021e51a3e8aa8f7cc976ec2f8385a3 /Core.hs | |
parent | c977b6b1f3833ed1ead9212d956d8f83a4ca9028 (diff) |
avoid empty commits
Diffstat (limited to 'Core.hs')
-rw-r--r-- | Core.hs | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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 -} |