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

Re: [PATCH v2] cli: add -v and -h shorthands

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 30, 2022, 21:53 UTC
Message-ID
<xmqq5ynv6rb4.fsf@gitster.g>
In-Reply-To
<20220330190956.21447-1-garrit@slashdev.space>
Garrit Franke <garrit@slashdev.space> writes:
Show 6 quoted lines
> Change the behavior of "git -v" to be synonymous with "--version" /
> "version", and "git -h" to be synonymous with "--help", but not "help".
>
> These shorthands both display the "unknown option" message. Following
> this change, "-v" displays the version, and "-h" displays the help text
> of the "git" command.
Sorry, but it is unclear why it is a good thing.
Show 5 quoted lines
> It should be noted that the "-v" shorthand could be misinterpreted by
> the user to mean "verbose" instead of "version", since some sub-commands
> make use of it in this context. The top-level "git" command does not
> have a "verbose" flag, so it's safe to introduce this shorthand
> unambiguously.

Again, it might be safe right now, but it also closes the door for introducing global "verbose" option. What in exchange are we gaining? Are these short options worth it?

I am not convinced.
Previous: Garrit FrankeNext: Garrit Franke
Message 2 of 11 in “cli: add -v and -h shorthands”
  1. cli: add -v and -h shorthandsGarrit Franke, Mar 30, 2022
  2. Junio C HamanoMar 30, 2022
  3. Garrit FrankeMar 30, 2022
  4. Ævar Arnfjörð BjarmasonMar 31, 2022
  5. Garrit FrankeMar 31, 2022
  6. Junio C HamanoMar 31, 2022
  7. Ævar Arnfjörð BjarmasonApr 1, 2022
  8. Junio C HamanoApr 1, 2022
  9. Garrit FrankeApr 4, 2022
  10. Junio C HamanoApr 4, 2022
  11. cli: add -v and -h shorthandsGarrit Franke, Mar 31, 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.