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

Antw: Antw:

From
UWUlrich Windl <ulrich.windl@rz.uni-regensburg.de>
Date
Feb 19, 2019, 07:03 UTC
Message-ID
<5C6BAA4E020000A10002FBFF@gwsmtp1.uni-regensburg.de>
In-Reply-To
<0A3130DD0200005B824A10E1@gwsmtp1.uni-regensburg.de>
>>> Elijah Newren <newren@gmail.com> schrieb am 18.02.2019 um 19:41 in

Nachricht <20190218184147.7563-1-newren@gmail.com>:

> Hi Ulrich,
> 
> Sorry for the late reply...

No problem, thanks for the explanation. I'll "fast forward" directly to the patch below and comment inline: -- Ulrich

[...]
Show 5 quoted lines
> ‑‑ 8< ‑‑
> Subject: [PATCH] merge‑options.txt: correct wording of ‑‑no‑commit option
> 
> The former wording implied that ‑‑no‑commit would always cause the
> merge operation to abort and allow the user to make further changes

I think "abort" is not the perfect word, because the merge would rather be "paused for commit" in my understanding; a "git merge --abort" is different, right?

Show 5 quoted lines
> and/or provide a special commit message for the merge commit.  This
> is not the case for fast‑forward merges, as there is no merge commit
> to create.  Without a merge commit, there is no place where it makes
> sense to "stop the merge and allow the user to tweak changes"; doing
> that would require a full rebase of some sort.

...and before trying the merge it's not always obvious whether the merge will be fast-forward type or not. So actually the outcome of --no-commit depends on the conents being merged, not on the command line options.

Show 12 quoted lines
> 
> Modify the wording to correctly address fast‑forward cases as well,
> and suggest using ‑‑no‑ff with ‑‑no‑commit if the point is to ensure
> that the merge aborts.
> 
> Reported‑by: Ulrich Windl <Ulrich.Windl@rz.uni‑regensburg.de>
> Signed‑off‑by: Elijah Newren <newren@gmail.com>
> ‑‑‑
>  Documentation/merge‑options.txt | 12 +++++++++‑‑‑
>  1 file changed, 9 insertions(+), 3 deletions(‑)
> 
> diff ‑‑git a/Documentation/merge‑options.txt
b/Documentation/merge‑options.txt
Show 24 quoted lines
> index c2a263ba74..d1061b8cf7 100644
> ‑‑‑ a/Documentation/merge‑options.txt
> +++ b/Documentation/merge‑options.txt
> @@ ‑3,9 +3,15 @@
>  	Perform the merge and commit the result. This option can
>  	be used to override ‑‑no‑commit.
>  +
> ‑With ‑‑no‑commit perform the merge but pretend the merge
> ‑failed and do not autocommit, to give the user a chance to
> ‑inspect and further tweak the merge result before committing.
> +With ‑‑no‑commit perform the merge and stop just before creating
> +a merge commit, to give the user a chance to inspect and further
> +tweak the merge result before committing.
> ++
> +Note that fast‑forward updates do not need to create a merge
> +commit and therefore there is no way to stop those merges with
> +‑‑no‑commit.  Thus, if you want to ensure your branch is not
> +changed or updated by the merge command, use ‑‑no‑ff with
> +‑‑no‑commit.
>  
>  ‑‑edit::
>  ‑e::
> ‑‑ 
> 2.21.0.rc1.264.g6c9e06a32d
Previous: Elijah NewrenNext: Elijah Newren
Message 5 of 11 in “Q: What happened to "--no-commit" merges?”
  1. Ulrich WindlJan 22, 2019
  2. Elijah NewrenJan 22, 2019
  3. Antw: Re: Q: What happened to "--no-commit" merges?Ulrich Windl, Jan 23, 2019
  4. Elijah Newren, Feb 18, 2019
  5. Antw: Antw:Ulrich Windl, Feb 19, 2019
  6. merge-options.txt: correct wording of --no-commit optionElijah Newren, Feb 19, 2019
  7. Junio C HamanoFeb 19, 2019
  8. Elijah NewrenFeb 19, 2019
  9. Junio C HamanoFeb 19, 2019
  10. merge-options.txt: correct wording of --no-commit optionElijah Newren, Feb 21, 2019
  11. Antw: Re: [PATCH v2] merge-options.txt: correct wording of --no-commit optionUlrich Windl, Feb 20, 2019

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.