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>
Larry D'Anna committed
Feb 26, 2010 at 23:52 UTC
60cfeb8e95d859bf250804c7981e8481e297c3b6
1 file changed
+1
-1
transport.c
+1
-1
@@ -675,7 +675,7 @@ static void print_ok_ref_status(struct ref *ref, int porcelain)
675
static int print_one_push_status(struct ref *ref, const char *dest, int count, int porcelain)
676
{
677
if (!count)
678
- fprintf(stderr, "To %s\n", dest);
678
+ fprintf(porcelain ? stdout : stderr, "To %s\n", dest);
679
680
switch(ref->status) {
681
case REF_STATUS_NONE: