add --no-commit option

This commit is contained in:
Joey Hess 2010-10-16 19:43:32 -04:00
parent b3e5590fb2
commit be5b1defeb
4 changed files with 32 additions and 13 deletions

View file

@ -24,8 +24,9 @@ startup flags = do
shutdown :: Annex ()
shutdown = do
g <- Annex.gitRepo
nocommit <- Annex.flagIsSet NoCommit
needcommit <- Annex.flagIsSet NeedCommit
if (needcommit)
if (needcommit && not nocommit)
then liftIO $ Git.run g ["commit", "-q", "-m",
"git-annex log update", gitStateDir g]
else return ()