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

Re: 'git branch --no-merge' is ambiguous

From
Andreas Schwab <schwab@linux-m68k.org>
Date
Sep 27, 2009, 08:01 UTC
Message-ID
<m24oqo3jg1.fsf@whitebox.home>
In-Reply-To
<20090927073305.GA15393@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 15 quoted lines
> -- >8 --
> From: Andreas Schwab <schwab@linux-m68k.org>
> Subject: [PATCH] parse-opt: ignore negation of OPT_NONEG for ambiguity checks
>
> parse_long_opt always matches both --opt and --no-opt for any option
> "opt", and only get_value checks whether --no-opt is actually valid.
> Since the options for git branch contains both "no-merged" and "merged"
> there are two matches for --no-merge, but no exact match.  With this
> patch the negation of a NONEG option is rejected earlier, but it changes
> the error message from "option `no-opt' isn't available" to "unknown
> option `no-opt'".
>
> [jk: added test]
>
> Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Andreas.
-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Previous: Jeff King
Message 4 of 4 in “'git branch --no-merge' is ambiguous”
  1. Johannes SixtSep 25, 2009
  2. Andreas SchwabSep 25, 2009
  3. Jeff KingSep 27, 2009
  4. Andreas SchwabSep 27, 2009

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.