git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Ardill <andrew.ardill@gmail.com>
To: Christoph Paulik <cpaulik@gmail.com>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: git merge branch --no-commit does commit fast forward merges
Date: Mon, 18 Apr 2016 17:44:13 +1000	[thread overview]
Message-ID: <CAH5451mDYhavx_OLfXe6cC2WguCsFWEBBBBOCPyX3E6ZJw27+w@mail.gmail.com> (raw)
In-Reply-To: <87a8krpehl.fsf@gmail.com>

On 18 April 2016 at 17:23, Christoph Paulik <cpaulik@gmail.com> wrote:
> My expectations from what should happen came mainly from the description of
> the --no-commit flag in the help:
>
> 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.
> So in the case of a fast-forward the flag does not pretend that the merge
> failed.

Yes, I think the mis-alignment in expectations comes from a
technicality in the description you quote. The fast forward is in some
ways not really counted as a true merge, and no new commits are
created.

Thus, the merge progresses up to the point where a merge resolution
would have to take place, realises that there is no merge resolution
to do (it's just a fast forward!) and so exits out. Unfortunately, a
side effect of this is that the fast-forward has already happened and
so you are left with something different from what was expected.

I do think that the --no-commit option should imply --no-ff (as this
would make the behaviour consistent for end-users). I don't know if
this is something that would break scripts etc, but if so you could
make it implied only if we detect a terminal or something like is done
in other places.

Regards,

Andrew Ardill

  reply	other threads:[~2016-04-18  7:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-17 21:10 git merge branch --no-commit does commit fast forward merges Christoph Paulik
2016-04-17 23:52 ` Jacob Keller
2016-04-18  6:26 ` Johannes Schindelin
2016-04-18  7:09   ` Andrew Ardill
2016-04-18  7:23     ` Christoph Paulik
2016-04-18  7:44       ` Andrew Ardill [this message]
2016-04-18 16:36         ` Junio C Hamano
2016-04-18 16:54           ` Junio C Hamano
2016-04-26 21:32             ` [PATCH 1/2] merge: do not contaminate option_commit with --squash Junio C Hamano
2016-04-27  6:46               ` Johannes Schindelin
2016-04-27 15:14                 ` Junio C Hamano
2016-04-27 15:19                   ` Johannes Schindelin
2016-04-26 21:37             ` [PATCH 2/2] merge: warn --no-commit merge when no new commit is created Junio C Hamano
2016-04-26 21:53               ` Stefan Beller
2016-04-26 22:00                 ` Junio C Hamano
2016-04-27  1:39               ` Eric Sunshine
2016-04-27  5:57               ` Johannes Sixt
2016-04-27  6:50               ` Johannes Schindelin
2016-04-27 15:13                 ` Junio C Hamano
2016-04-27 15:37                   ` Johannes Schindelin
2016-04-27 16:02                     ` Junio C Hamano

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

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

  git send-email \
    --in-reply-to=CAH5451mDYhavx_OLfXe6cC2WguCsFWEBBBBOCPyX3E6ZJw27+w@mail.gmail.com \
    --to=andrew.ardill@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=cpaulik@gmail.com \
    --cc=git@vger.kernel.org \
    /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.
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 NNTP newsgroup(s).