aboutsummaryrefslogtreecommitdiff
path: root/run-command.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-11-14 14:26:04 -0800
committerJunio C Hamano <gitster@pobox.com>2007-11-14 14:26:04 -0800
commitf5f6cb87defc4b7e8ba6cc6e82f616bef47ea6b0 (patch)
treecfa0daa0b019e83aba1d15ae5d8a4359da578a0e /run-command.c
parentb2e163272c01aca4aee4684f5c683ba341c1953d (diff)
parent4191c35671f6392173221bea3994f8b305f4f3a8 (diff)
downloadgit-f5f6cb87defc4b7e8ba6cc6e82f616bef47ea6b0.tar.xz
Merge branch 'sp/fetch-fix'
* sp/fetch-fix: git-fetch: avoid local fetching from alternate (again) rev-list: Introduce --quiet to avoid /dev/null redirects run-command: Support sending stderr to /dev/null git-fetch: Always fetch tags if the object they reference exists
Diffstat (limited to 'run-command.c')
-rw-r--r--run-command.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/run-command.c b/run-command.c
index d99a6c4ea7..476d00c218 100644
--- a/run-command.c
+++ b/run-command.c
@@ -41,7 +41,7 @@ int start_command(struct child_process *cmd)
cmd->close_out = 1;
}
- need_err = cmd->err < 0;
+ need_err = !cmd->no_stderr && cmd->err < 0;
if (need_err) {
if (pipe(fderr) < 0) {
if (need_in)
@@ -87,7 +87,9 @@ int start_command(struct child_process *cmd)
close(cmd->out);
}
- if (need_err) {
+ if (cmd->no_stderr)
+ dup_devnull(2);
+ else if (need_err) {
dup2(fderr[1], 2);
close_pair(fderr);
}