git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Elijah Newren <newren@gmail.com>
To: <gitster@pobox.com>
Cc: <git@vger.kernel.org>,
	Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>,
	Elijah Newren <newren@gmail.com>
Subject: [PATCH v2] merge-options.txt: correct wording of --no-commit option
Date: Tue, 19 Feb 2019 09:07:09 -0800	[thread overview]
Message-ID: <20190219170709.25463-1-newren@gmail.com> (raw)
In-Reply-To: <5C6BAA4E020000A10002FBFF@gwsmtp1.uni-regensburg.de>

The former wording implied that --no-commit would always cause the
merge operation to "pause" and allow the user to make further changes
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.

Since users may be unaware of whether their branches have diverged or
not, 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 stops before completing.

Reported-by: Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>
Signed-off-by: Elijah Newren <newren@gmail.com>
---
Changes since v1:
  - Tweaked commit message

 Documentation/merge-options.txt | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/Documentation/merge-options.txt b/Documentation/merge-options.txt
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


  reply	other threads:[~2019-02-19 17:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-22 20:55 Q: What happened to "--no-commit" merges? Ulrich Windl
2019-01-22 21:29 ` Elijah Newren
2019-01-23  7:04   ` Antw: " Ulrich Windl
2019-02-18 18:41     ` Elijah Newren
     [not found]       ` <0A3130DD0200005B824A10E1@gwsmtp1.uni-regensburg.de>
2019-02-19  7:03         ` Antw: Antw: Ulrich Windl
2019-02-19 17:07           ` Elijah Newren [this message]
2019-02-19 19:32             ` [PATCH v2] merge-options.txt: correct wording of --no-commit option Junio C Hamano
2019-02-19 22:31               ` Elijah Newren
2019-02-19 22:38                 ` Junio C Hamano
     [not found]               ` <07106FB4020000CD824A10E1@gwsmtp1.uni-regensburg.de>
     [not found]                 ` <AC7679FC02000011B9FD70CF@gwsmtp1.uni-regensburg.de>
2019-02-20  7:29                   ` Antw: " Ulrich Windl
2019-02-21 17:50             ` [PATCH v3] " Elijah Newren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190219170709.25463-1-newren@gmail.com \
    --to=newren@gmail.com \
    --cc=Ulrich.Windl@rz.uni-regensburg.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).