diff options
-rw-r--r-- | Assistant/Threads/Committer.hs | 4 | ||||
-rw-r--r-- | Git/Command.hs | 6 | ||||
-rw-r--r-- | debian/changelog | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/Assistant/Threads/Committer.hs b/Assistant/Threads/Committer.hs index 0062e2324..bd858ed38 100644 --- a/Assistant/Threads/Committer.hs +++ b/Assistant/Threads/Committer.hs @@ -81,7 +81,7 @@ commitStaged = do Left _ -> return False Right _ -> do direct <- isDirect - void $ inRepo $ Git.Command.runBool "commit" $ nomessage $ + let params = nomessage $ catMaybes [ Just $ Param "--quiet" {- In indirect mode, avoid running the @@ -94,6 +94,8 @@ commitStaged = do {- Empty commits may be made if tree changes cancel - each other out, etc. Git returns nonzero on those, - so don't propigate out commit failures. -} + void $ inRepo $ catchMaybeIO . + Git.Command.runQuiet "commit" params return True where nomessage ps diff --git a/Git/Command.hs b/Git/Command.hs index 88fed56e8..af3ca1c4a 100644 --- a/Git/Command.hs +++ b/Git/Command.hs @@ -37,6 +37,12 @@ run subcommand params repo = assertLocal repo $ unlessM (runBool subcommand params repo) $ error $ "git " ++ subcommand ++ " " ++ show params ++ " failed" +{- Runs git and forces it to be quiet, throwing an error if it fails. -} +runQuiet :: String -> [CommandParam] -> Repo -> IO () +runQuiet subcommand params repo = withQuietOutput createProcessSuccess $ + (proc "git" $ toCommand $ gitCommandLine (Param subcommand : params) repo) + { env = gitEnv repo } + {- Runs a git subcommand and returns its output, lazily. - - Also returns an action that should be used when the output is all diff --git a/debian/changelog b/debian/changelog index c6ba63db9..1d87d65b6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ git-annex (4.20130228) UNRELEASED; urgency=low * webapp: Only show up to 10 queued transfers. * Several improvements to Makefile and cabal file. Thanks, Peter Simmons * assistant: Logs are rotated to avoid them using too much disk space. + * assistant: Avoid noise in logs from git commit about typechanged + files in direct mode repositories. -- Joey Hess <joeyh@debian.org> Wed, 27 Feb 2013 23:20:40 -0400 |