Re: [PATCH 3/4] git-push: send "To <remoteurl>" messages to the standard output in --porcelain mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, Feb 9, 2010 at 1:54 PM, Larry D'Anna <larry@xxxxxxxxxxxxxx> wrote:
> 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:

just to check - are debug and user-specific messages (like advice and
info) to be sent, by convention/design/force-of-habit, to stderr? Are
those the "cruft" that has been referred to in other threads?

If that's the case, then perhaps the "To: <destination>" lines should
be sent to both stdout and stderr - stdout, for porcelain scripts as a
"header", and stderr, to help the user make sense of any errors that
occur ("oh, these errors were triggered when pushing to so-and-so
remote").

-- 
Cheers,
Ray Chuan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]