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

Re: [PATCH] stash: complain about unknown flags

From
VLVincent Legoll <vincent.legoll@gmail.com>
Date
Nov 1, 2015, 08:16 UTC
Message-ID
<CAEwRq=p5AGE4ingzp8QFyUPetkiY7bgCyx6ZeaetzO5uQayXpg@mail.gmail.com>
In-Reply-To
<20150520180132.GB14561@peff.net>
Hello,
On Wed, May 20, 2015 at 8:01 PM, Jeff King <peff@peff.net> wrote:
Show 15 quoted lines
> The option parser for git-stash stuffs unknown flags into
> the $FLAGS variable, where they can be accessed by the
> individual commands. However, most commands do not even look
> at these extra flags, leading to unexpected results like
> this:
>
>   $ git stash drop --help
>   Dropped refs/stash@{0} (e6cf6d80faf92bb7828f7b60c47fc61c03bd30a1)
>
> We should notice the extra flags and bail. Rather than
> annotate each command to reject a non-empty $FLAGS variable,
> we can notice that "stash show" is the only command that
> actually _wants_ arbitrary flags. So we switch the default
> mode to reject unknown flags, and let stash_show() opt into
> the feature.
Better late than never, that does look good...
-- 
Vincent Legoll
Previous: Vincent Legoll
Message 5 of 5 in “[BUG, RFC] git stash drop --help”
  1. Vincent LegollMay 20, 2015
  2. stash: complain about unknown flagsJeff King, May 20, 2015
  3. 2/1 stash: recognize "--help" for subcommandsJeff King, May 20, 2015
  4. Vincent LegollNov 1, 2015
  5. Vincent LegollNov 1, 2015

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.