git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 25, 2022, 16:35 UTC
Message-ID
<xmqq5yo2c7ng.fsf@gitster.g>
In-Reply-To
<202ec3ce-76ee-a46b-3235-e801339eb153@github.com>
Derrick Stolee <derrickstolee@github.com> writes:
Show 20 quoted lines
> On 3/24/2022 1:33 PM, Junio C Hamano wrote:
>> Junio C Hamano <gitster@pobox.com> writes:
>>> #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!
>
>> Unfortunately, I merged these already to 'next' before seeing your
>> comment, so we'd need to go incremental.
>> 
>> How about this?
>
>> -		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.

Previous: Derrick Stolee
Message 25 of 25 in “reset: make --no-refresh the only way to skip index refresh”
  1. 0/4 reset: make --no-refresh the only way to skip index refreshVictoria Dye via GitGitGadget, Mar 21, 2022
  2. 2/4 reset: deprecate 'reset.quiet' config optionVictoria Dye via GitGitGadget, Mar 21, 2022
  3. Phillip WoodMar 23, 2022
  4. 1/4 reset: do not make '--quiet' disable index refreshVictoria Dye via GitGitGadget, Mar 21, 2022
  5. Phillip WoodMar 23, 2022
  6. Victoria DyeMar 23, 2022
  7. 3/4 reset: deprecate 'reset.refresh' config optionVictoria Dye via GitGitGadget, Mar 21, 2022
  8. Phillip WoodMar 23, 2022
  9. Victoria DyeMar 23, 2022
  10. 4/4 reset: deprecate '--refresh', leaving only '--no-refresh'Victoria Dye via GitGitGadget, Mar 21, 2022
  11. Phillip WoodMar 23, 2022
  12. Victoria DyeMar 23, 2022
  13. 0/3 reset: make --no-refresh the only way to skip index refreshVictoria Dye via GitGitGadget, Mar 23, 2022
  14. 1/3 reset: do not make '--quiet' disable index refreshVictoria Dye via GitGitGadget, Mar 23, 2022
  15. 2/3 reset: remove 'reset.quiet' config optionVictoria Dye via GitGitGadget, Mar 23, 2022
  16. 3/3 reset: remove 'reset.refresh' config optionVictoria Dye via GitGitGadget, Mar 23, 2022
  17. Derrick StoleeMar 23, 2022
  18. Junio C HamanoMar 23, 2022
  19. Phillip WoodMar 24, 2022
  20. Junio C HamanoMar 24, 2022
  21. Junio C HamanoMar 24, 2022
  22. Victoria DyeMar 24, 2022
  23. Junio C HamanoMar 24, 2022
  24. Derrick StoleeMar 25, 2022
  25. Junio C HamanoMar 25, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.