Thread (1 message) 1 message, 1 author, 2025-01-16

Re: Git branch outputs usage message on stderr

From: Junio C Hamano <hidden>
Date: 2025-01-16 01:21:57

Junio C Hamano [off-list ref] writes:
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help