git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miklos Vajna <vmiklos@suse.cz>
To: Junio C Hamano <gitster@pobox.com>
Cc: Michael Haggerty <mhagger@alum.mit.edu>, git@vger.kernel.org
Subject: Re: [PATCH] merge: allow using --no-ff and --ff-only at the same time
Date: Mon, 1 Jul 2013 18:10:09 +0200	[thread overview]
Message-ID: <20130701161009.GI17269@suse.cz> (raw)
In-Reply-To: <7vmwq6i93m.fsf@alter.siamese.dyndns.org>

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

On Mon, Jul 01, 2013 at 08:38:21AM -0700, Junio C Hamano <gitster@pobox.com> wrote:
> As to "--no-ff" vs "--ff-only", "--ff-only" has always meant "only
> fast-forward updates are allowed.  We do not want to create a merge
> commit with this operation."  I do agree with you that the proposed
> patch changes the established semantis and may be too disruptive a
> thing to do at this point.

Hmm, one way around this may be to add a new option that is basically
the same as --no-ff --ff-only (with the patch), except it has a
different name, so it's not confusing. 'git merge --rebase' could be
used for this, but such a name is misleading as well. Anyone has a
better naming idea? :-)

> If one were designing Git merge from scratch today, however, I could
> see one may have designed these as two orthogonal switches.
> 
>  - Precondition on the shape of histories being merged ("fail unless
>    fast forward" does not have to be the only criteria);
> 
>  - How the update is done ("fast forward to the other head", "always
>    create a merge", "fast forward if possible, otherwise merge" do
>    not have to be the only three choices).
> 
> I do not fundamentally oppose to such a new feature, but they have
> to interact sanely with the current "--ff={only,only,never}".

OK, so if I get it right, the problem is that users got used to that
the --ff-only not only means a precondition for the merge, but also
means "either don't create a merge commit or fail", while my patch would
change this second behaviour.

I could imagine then new switches, like 'git merge --pre=ff
--update=no-ff" could provide these, though I'm not sure if it makes
sense to add such generic switches till the only user is "ff".

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2013-07-01 16:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-01  7:01 [PATCH] merge: allow using --no-ff and --ff-only at the same time Miklos Vajna
2013-07-01 14:52 ` Michael Haggerty
2013-07-01 15:27   ` Miklos Vajna
2013-07-01 15:38   ` Junio C Hamano
2013-07-01 16:10     ` Miklos Vajna [this message]
2013-07-01 16:43       ` Junio C Hamano
2013-07-01 19:54   ` [PATCH] merge: handle --ff/--no-ff/--ff-only as a tri-state option Miklos Vajna
2013-07-01 20:27     ` Junio C Hamano
2013-07-02  8:42     ` Michael Haggerty
2013-07-02 14:47       ` [PATCH v2] " Miklos Vajna
2013-07-02 20:12         ` Junio C Hamano
2013-07-02 18:46       ` [PATCH] " 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=20130701161009.GI17269@suse.cz \
    --to=vmiklos@suse.cz \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mhagger@alum.mit.edu \
    /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).