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

Re: [PATCH v2 4/4] scalar reconfigure: add --no-maintenance option

From
Junio C Hamano <gitster@pobox.com>
Date
May 6, 2025, 22:16 UTC
Message-ID
<xmqqselhfkq8.fsf@gitster.g>
In-Reply-To
<3e307bf1-52ef-4280-bada-5cc50cc7a817@gmail.com>
Derrick Stolee <stolee@gmail.com> writes:
Show 6 quoted lines
> What do you think about something of the form --maintenance=<option>
> where <option> is one of these:
>
>  * "enable" (default) runs 'git maintenance start'
>  * "disable" runs 'git maintenance unregister'
>  * "keep" does not mess with maintenance config.
I think it makes superb sense.  

Certainly much less ambiguous than "--[no-]maintenance" given that we need to handle "reconfigure". Without the need to deal with "reconfigure", it certainly is attractive if we can treat it as a simple Boolean, though.

It is also tempting to just initialize the internal variable to -1 and keep using OPT_BOOL() though. Then after config and command line parsing is done, clone and register would turn -1 the user did not touch into 1 (i.e. enable is default for these two operations), while reconfigure treats -1 as "leave it as-is". It would make it very cumbersome if we ever change our mind and give a default other than "leave it as-is" to "reconfigure", but other than that minor downside, it may be easier to use from end-user's point of view.

I have no strong opinion between the two.
Thanks.
    
Previous: Derrick StoleeNext: Derrick Stolee via GitGitGadget
Message 17 of 30 in “scalar: add --no-maintenance option”
  1. 0/2 scalar: add --no-maintenance optionDerrick Stolee via GitGitGadget, Apr 30, 2025
  2. 1/2 scalar register: add --no-maintenance optionDerrick Stolee via GitGitGadget, Apr 30, 2025
  3. Patrick SteinhardtMay 2, 2025
  4. Derrick StoleeMay 2, 2025
  5. 2/2 scalar clone: add --no-maintenance optionDerrick Stolee via GitGitGadget, Apr 30, 2025
  6. Junio C HamanoApr 30, 2025
  7. Derrick StoleeMay 1, 2025
  8. Junio C HamanoMay 1, 2025
  9. Junio C HamanoMay 1, 2025
  10. 0/4 scalar: add --no-maintenance optionDerrick Stolee via GitGitGadget, May 5, 2025
  11. 1/4 scalar: customize register_dir()'s behaviorDerrick Stolee via GitGitGadget, May 5, 2025
  12. 2/4 scalar register: add --no-maintenance optionDerrick Stolee via GitGitGadget, May 5, 2025
  13. 3/4 scalar clone: add --no-maintenance optionDerrick Stolee via GitGitGadget, May 5, 2025
  14. 4/4 scalar reconfigure: add --no-maintenance optionDerrick Stolee via GitGitGadget, May 5, 2025
  15. Junio C HamanoMay 5, 2025
  16. Derrick StoleeMay 6, 2025
  17. Junio C HamanoMay 6, 2025
  18. 0/4 scalar: add --no-maintenance optionDerrick Stolee via GitGitGadget, May 7, 2025
  19. 1/4 scalar: customize register_dir()'s behaviorDerrick Stolee via GitGitGadget, May 7, 2025
  20. 2/4 scalar register: add --no-maintenance optionDerrick Stolee via GitGitGadget, May 7, 2025
  21. 3/4 scalar clone: add --no-maintenance optionDerrick Stolee via GitGitGadget, May 7, 2025
  22. 4/4 scalar reconfigure: add --maintenance=<mode> optionDerrick Stolee via GitGitGadget, May 7, 2025
  23. Junio C HamanoMay 7, 2025
  24. Derrick StoleeMay 12, 2025
  25. Junio C HamanoMay 12, 2025
  26. Derrick StoleeMay 12, 2025
  27. Junio C HamanoMay 14, 2025
  28. 5/4 scalar reconfigure: improve --maintenance docsDerrick Stolee, May 14, 2025
  29. Junio C HamanoMay 14, 2025
  30. Derrick StoleeMay 16, 2025

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.