summaryrefslogtreecommitdiff
path: root/Git/Command.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Git/Command.hs')
-rw-r--r--Git/Command.hs6
1 files changed, 6 insertions, 0 deletions
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