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

Re: [PATCH] doc: add missing --message long option to merge docs

From
BBrandon <brandondong96@gmail.com>
Date
May 31, 2026, 06:37 UTC
Message-ID
<CABe-Dmb3-AeT+utpstLWJRGrrEcbXSDYDqnWgMHOwAv85-7eDg@mail.gmail.com>
In-Reply-To
<xmqqo6hyiz9g.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 8 quoted lines
> Hmph.  This is still not consistent with "git merge -h" output has,
> which seems to accept --[no-]message as well.
>
> It is not exactly your fault, but there are a few options other than
> this one that support optional [no-] and they are not documented as
> such, even though they appear in "git merge -h".  "git merge -m foo
> --no-message other" behaves as if "GIT_EDITOR=: git merge other" was
> run, it seems.

Looking at the code, I believe this might be intentional or maybe a stylistic choice to document this way?

The overwhelming majority of long name flags have a [no-] variant as it comes for free when defining a new option and otherwise requires an explicit opt out (via PARSE_OPT_NONEG).

The -h output auto-generates the inclusion of [no-] but for the handwritten docs, most examples I see where it's included are for cases where the [no-] variant has some behavior nuance that needs to be explained or it's for a bool-like flag. Most string-valued options do not include mention of the [no-] variant and they share the default behavior where passing the [no-] variant unsets the option.

For -m/--message in particular, none of the git-commit/git-notes/git-svn/git-tag docs mention the --no variant either and I think merge should be consistent with them.

Previous: Junio C Hamano
Message 3 of 3 in “doc: add missing --message long option to merge docs”
  1. doc: add missing --message long option to merge docsBrandon Dong via GitGitGadget, May 29, 2026
  2. Junio C HamanoMay 29, 2026
  3. BrandonMay 31, 2026

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.