Re: [RFC][PATCH] Print the usage string on stdout instead of stderr.

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

 



Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx> writes:

> More importantly, callers expect error messages on stderr, such as usage
> with wrong arguments. I don't think scripts would call commands with
> '-h', and if they do they do so on purpose and can parse stderr, knowing
> there is no stdout in this case.

It looks like a workaround to me.  Anyway, if -h is left unchanged then,
I think, --help should be adjusted as well when it doesn't use an
external pager.

These two commands behave differently:

git status --help 2>/dev/null | cat -
git status -h 2>/dev/null | cat -

IMO, what should be changed is -h to be uniform with --help, as the it
is the expected output, not an error.

Cheers,
Giuseppe
--
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]