assistant: Avoid noise in logs from git commit about typechanged files in direct mode repositories.
This commit is contained in:
parent
2f2d67df85
commit
4d33423067
3 changed files with 11 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue