From: Larry D'Anna Date: Sat, 27 Feb 2010 04:52:14 +0000 (-0500) Subject: git-push: send "To " messages to the standard output in --porcelain mode X-Git-Tag: v1.7.1-rc0~67^2~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=60cfeb8e95d859bf250804c7981e8481e297c3b6;p=git.git git-push: send "To " messages to the standard output in --porcelain mode git-push prints the line "To " before above each of the ref status lines. In --porcelain mode, these "To " 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 " lines to the the standard output instead. Signed-off-by: Larry D'Anna Signed-off-by: Junio C Hamano --- diff --git a/transport.c b/transport.c index 3846aacb4..fb653c654 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: