public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Christoph Paulik <cpaulik@gmail•com>
To: Andrew Ardill <andrew.ardill@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 09:23:18 +0200	[thread overview]
Message-ID: <87a8krpehl.fsf@gmail.com> (raw)
In-Reply-To: <CAH5451kW3t1Y7oW=uHv85jzHwsnQcDK2jdLisauNF-x1LRwqLA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2223 bytes --]


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. 

Regards,
Christoph 
 

Andrew Ardill writes:

> 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


-- 

-------------------------------------------------------
Christoph Paulik
Twitter, Github: @cpaulik
PGP: 8CFC D7DF 2867 B2DC 749B  1B0A 6E3B A262 5186 A0AC

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

  reply	other threads:[~2016-04-18  7:23 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 [this message]
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=87a8krpehl.fsf@gmail.com \
    --to=cpaulik@gmail$(echo .)com \
    --cc=Johannes.Schindelin@gmx$(echo .)de \
    --cc=andrew.ardill@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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