summaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
authorLarry D'Anna <larry@elder-gods.org>2010-02-27 04:52:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-02-28 18:39:28 (GMT)
commit60cfeb8e95d859bf250804c7981e8481e297c3b6 (patch)
tree7b2c68f4416b4ab7378a3151097d1150aa274379 /transport.c
parent011fe9814f7be7df7212229fa4f8393e03829cb7 (diff)
downloadgit-60cfeb8e95d859bf250804c7981e8481e297c3b6.zip
git-60cfeb8e95d859bf250804c7981e8481e297c3b6.tar.gz
git-60cfeb8e95d859bf250804c7981e8481e297c3b6.tar.bz2
git-push: send "To <remoteurl>" messages to the standard output in --porcelain mode
git-push prints the line "To <remoteurl>" before above each of the ref status lines. In --porcelain mode, these "To <remoteurl>" lines go to the standard error, but the ref status lines go to the standard output. This makes it difficult for the process reading standard output to know which ref status lines correspond to which remote. This patch sends the "To <remoteurl>" lines to the the standard output instead. Signed-off-by: Larry D'Anna <larry@elder-gods.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/transport.c b/transport.c
index 3846aac..fb653c6 100644
--- a/transport.c
+++ b/transport.c
@@ -675,7 +675,7 @@ static void print_ok_ref_status(struct ref *ref, int porcelain)
static int print_one_push_status(struct ref *ref, const char *dest, int count, int porcelain)
{
if (!count)
- fprintf(stderr, "To %s\n", dest);
+ fprintf(porcelain ? stdout : stderr, "To %s\n", dest);
switch(ref->status) {
case REF_STATUS_NONE: