summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-09-10 15:25:09 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-09-10 15:25:09 -0700
commit3f664638e5d5afa0982eaa14fec5df70be56d52b (patch)
tree333951c63a6a82bc86a488ad5b98cbf2b9dbbcdd /builtin
parentMerge branch 'jk/maint-null-in-trees' into maint-1.7.11 (diff)
parentreceive-pack: do not leak output from auto-gc to standard output (diff)
downloadtgif-3f664638e5d5afa0982eaa14fec5df70be56d52b.tar.xz
Merge branch 'bc/receive-pack-stdout-protection' into maint-1.7.11
When "git push" triggered the automatic gc on the receiving end, a message from "git prune" that said it was removing cruft leaked to the standard output, breaking the communication protocol. * bc/receive-pack-stdout-protection: receive-pack: do not leak output from auto-gc to standard output t/t5400: demonstrate breakage caused by informational message from prune
Diffstat (limited to 'builtin')
-rw-r--r--builtin/receive-pack.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 0afb8b2896..3f05d971ec 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -977,7 +977,8 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix)
const char *argv_gc_auto[] = {
"gc", "--auto", "--quiet", NULL,
};
- run_command_v_opt(argv_gc_auto, RUN_GIT_CMD);
+ int opt = RUN_GIT_CMD | RUN_COMMAND_STDOUT_TO_STDERR;
+ run_command_v_opt(argv_gc_auto, opt);
}
if (auto_update_server_info)
update_server_info(0);