Re: Git branch outputs usage message on stderr
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 16, 2025, 01:21 UTC
- Message-ID
- <xmqq7c6vv9hp.fsf@gitster.g>
- In-Reply-To
- <xmqqplknvek2.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 7 quoted lines
> It is a tangent, but I wonder how many among the 40 really needed to > use usage_with_options() to react to "-h" in the first place. In > other words, these manual checks for "-h" are done only because the > code _wants_ to react to "-h" before it calls parse_options(), but > does everybody who _wants_ to do so really _needs_ to do so? You > already have shown that "gir branch" did not have to, and to me, 40 > among 100+ felt way too many.
It turns out that some of the actually cannot be helped, as they do not even use parse-options and calling usage() themselves is the only way to show the usage text for them.
I'll send a 6-patch series out shortly.