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

Re: [PATCH v3] stash: don't show "git stash push" usage on bad "git stash" usage

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 16, 2021, 22:05 UTC
Message-ID
<xmqq8rwk8atn.fsf@gitster.g>
In-Reply-To
<patch-v3-1.1-6b33b104c84-20211216T125317Z-avarab@gmail.com>
Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
Show 6 quoted lines
> This still leaves e.g. "git stash push -h" emitting the
> "git_stash_usage" output, instead of "git_stash_push_usage". That
> should be fixed, but is a much deeper misbehavior in parse_options()
> not being aware of subcommands at all. I.e. in how
> PARSE_OPT_KEEP_UNKNOWN and PARSE_OPT_NO_INTERNAL_HELP combine in
> commands such as "git stash".

I do not necessarily think that is misbehaviour to begin with, but in any case, it is good to keep the initial fix focused on a small and clear case, like the one the patch addresses.

Previous: Junio C Hamano
Message 5 of 5 in “stash: print the correct usage on "git stash [push] --invalid-option"”
  1. stash: print the correct usage on "git stash [push] --invalid-option"Ævar Arnfjörð Bjarmason, Sep 1, 2021
  2. stash: print the correct usage on "git stash [push] --invalid-option"Ævar Arnfjörð Bjarmason, Sep 21, 2021
  3. stash: don't show "git stash push" usage on bad "git stash" usageÆvar Arnfjörð Bjarmason, Dec 16, 2021
  4. Junio C HamanoDec 16, 2021
  5. Junio C HamanoDec 16, 2021

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.