All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Ardill <andrew.ardill@gmail.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Christoph Paulik <cpaulik@gmail.com>,
	"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:09:18 +1000	[thread overview]
Message-ID: <CAH5451kW3t1Y7oW=uHv85jzHwsnQcDK2jdLisauNF-x1LRwqLA@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1604180825170.2967@virtualbox>

On 18 April 2016 at 16:26, Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
>
> > The command only works as expected when also adding the --no-ff flag.
>
> Then you need to fix your expectations ;-)

I *think* the core of this problem is that the intent of the end-user
does not align with the command options available.

In this use case (as far as I can tell), the user wants to see what
the result of a merge from somewhere else will look like, without
changing their HEAD.

While you are correct in saying a fast-forward does not create any new
commits, for the user it certainly looks like a whole slew of new
commits have been added. Moreover, the nature of the option means that
the user has to investigate if the merge is a fast-forward in order to
know what the outcome of the command will be.

If the merge is a fast-forward, --no-commit has no effect on the
outcome. If the merge is not a fast-forward, --no-commit has a huge
effect on the outcome.

If I see a --no-commit option, as an inexperienced user, I would be
quite surprised to find my HEAD changed after using it. It would be
far more intuitive, for that user, for --no-commit to imply --no-ff
however I suspect that such a change may well cause more problems then
it fixes.

What I wonder is, in what situation is the current behaviour is desirable?

While I agree that the option works as designed, I think its behaviour
is more surprising to the end user then it should be.

Regards,

Andrew Ardill

  reply	other threads:[~2016-04-18  7:10 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 [this message]
2016-04-18  7:23     ` Christoph Paulik
2016-04-18  7:44       ` Andrew Ardill
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='CAH5451kW3t1Y7oW=uHv85jzHwsnQcDK2jdLisauNF-x1LRwqLA@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.