Thread (1 message) 1 message, 1 author, 2022-03-25

Re: [PATCH v2 0/3] reset: make --no-refresh the only way to skip index refresh

From: Junio C Hamano <hidden>
Date: 2022-03-25 16:35:23

Derrick Stolee [off-list ref] writes:
On 3/24/2022 1:33 PM, Junio C Hamano wrote:
quoted
Junio C Hamano [off-list ref] writes:
quoted
#leftoverbit: we may want to discuss if it is a good idea to teach
OPT_BOOL() to list "--[no-]<option>" in "git cmd -h", instead of
just "--<option>".
Good idea!
quoted
Unfortunately, I merged these already to 'next' before seeing your
comment, so we'd need to go incremental.

How about this?
quoted
-		OPT_BOOL(0, "refresh", &refresh,
+		OPT_BOOL(0, "no-refresh", &no_refresh,
 				N_("skip refreshing the index after reset")),
I'm pleasantly surprised that this still allows --refresh (in addition to
--no-no-refresh). So, the only meaningful functional change is indeed the
-h output.
Yeah, it is a pleasant easter egg surprise that --refresh is taken
as the opposite but its cousin that we allow --no-no-refresh is
somehow questionably ugly, albeit it does not hurt anybody, except
for purists who would certainly complain that --no-no-no-refresh is
not understood.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help