* [PATCH] doc: add missing --message long option to merge docs
@ 2026-05-29 1:55 Brandon Dong via GitGitGadget
2026-05-29 5:02 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Brandon Dong via GitGitGadget @ 2026-05-29 1:55 UTC (permalink / raw)
To: git; +Cc: Brandon Dong, Brandon
From: Brandon <brandondong96@gmail.com>
Include mention of --message flag in merge docs to match what is
accepted (builtin/merge.c) and to make it consistent with the git
commit docs.
Signed-off-by: Brandon Dong <brandondong96@gmail.com>
---
doc: add missing --message long option to merge docs
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2315%2Fbrandondong%2Fmerge_message_docs-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2315/brandondong/merge_message_docs-v1
Pull-Request: https://github.com/git/git/pull/2315
Documentation/git-merge.adoc | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/git-merge.adoc b/Documentation/git-merge.adoc
index a055384ad6..6581f4c69c 100644
--- a/Documentation/git-merge.adoc
+++ b/Documentation/git-merge.adoc
@@ -68,6 +68,7 @@ OPTIONS
include::merge-options.adoc[]
`-m <msg>`::
+`--message=<msg>`::
Set the commit message to be used for the merge commit (in
case one is created).
+
base-commit: c69baaf57ba26cf117c2b6793802877f19738b0d
--
gitgitgadget
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] doc: add missing --message long option to merge docs
2026-05-29 1:55 [PATCH] doc: add missing --message long option to merge docs Brandon Dong via GitGitGadget
@ 2026-05-29 5:02 ` Junio C Hamano
2026-05-31 6:37 ` Brandon
0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2026-05-29 5:02 UTC (permalink / raw)
To: Brandon Dong via GitGitGadget; +Cc: git, Brandon Dong
"Brandon Dong via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: Brandon <brandondong96@gmail.com>
As you identify yourself as "Brandon Dong" on the Signed-off-by line
below, please match this in-body From: line with it.
> Include mention of --message flag in merge docs to match what is
> accepted (builtin/merge.c) and to make it consistent with the git
> commit docs.
>
> Signed-off-by: Brandon Dong <brandondong96@gmail.com>
> ---
> doc: add missing --message long option to merge docs
>
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2315%2Fbrandondong%2Fmerge_message_docs-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2315/brandondong/merge_message_docs-v1
> Pull-Request: https://github.com/git/git/pull/2315
>
> Documentation/git-merge.adoc | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/git-merge.adoc b/Documentation/git-merge.adoc
> index a055384ad6..6581f4c69c 100644
> --- a/Documentation/git-merge.adoc
> +++ b/Documentation/git-merge.adoc
> @@ -68,6 +68,7 @@ OPTIONS
> include::merge-options.adoc[]
>
> `-m <msg>`::
> +`--message=<msg>`::
> Set the commit message to be used for the merge commit (in
> case one is created).
> +
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] doc: add missing --message long option to merge docs
2026-05-29 5:02 ` Junio C Hamano
@ 2026-05-31 6:37 ` Brandon
0 siblings, 0 replies; 3+ messages in thread
From: Brandon @ 2026-05-31 6:37 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Brandon Dong via GitGitGadget, git
Junio C Hamano <gitster@pobox.com> writes:
> 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-31 6:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-29 1:55 [PATCH] doc: add missing --message long option to merge docs Brandon Dong via GitGitGadget
2026-05-29 5:02 ` Junio C Hamano
2026-05-31 6:37 ` Brandon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox