git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: usbuser@mailbox.org
Cc: git@vger.kernel.org
Subject: Re: Unexpected or wrong ff, no-ff and ff-only behaviour
Date: Tue, 09 Jul 2019 07:51:14 -0700	[thread overview]
Message-ID: <xmqqa7dnw9b1.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <423596682.8516.1562665372094@office.mailbox.org> (usbuser@mailbox.org's message of "Tue, 9 Jul 2019 11:42:51 +0200 (CEST)")

usbuser@mailbox.org writes:

> I'm rather confused about --ff, --no-ff and --ff-only. They seam
> to be all mutual exclusive...

A clean result left by "git merge" can be either a fast-forward, or
a real merge (i.e. 2 possible outcomes).

The --ff option lets you say "If the other history I am attempting
to merge is a descendant of the current commit, not creating a real
merge and instead fast-forwarding is permitted".  As this is the
default, case you actually type --ff on the command line is rather
limited (e.g. to countermand an earlier --no-ff on the command
line).

The --no-ff option lets you say "I never accept a fast-forward as
the result; please make a real merge instead, even if it is
redundant".

The --ff-only option lets you say "I never accept a real merge as 
the result; please fail if this does not fast-forward".

So, the only "real" options are between --[no-]ff (which allows or
disallows one of the two possible outcomes, which is "fast-forward")
and [--ff-only] (which allows or disallows the other one of the two
possible outcomes, which is "real merge").

  reply	other threads:[~2019-07-09 14:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-09  9:42 Unexpected or wrong ff, no-ff and ff-only behaviour usbuser
2019-07-09 14:51 ` Junio C Hamano [this message]
2019-07-09 16:15   ` Roland Jäger
2019-07-09 16:35     ` Elijah Newren
2019-07-09 17:00       ` usbuser
2019-07-09 20:33         ` Elijah Newren
2019-07-09 20:51           ` Bryan Turner
2019-07-10  7:49             ` usbuser
2019-07-10 16:34             ` Junio C Hamano
2019-07-11  5:13               ` Sergey Organov
2019-07-11 17:03                 ` Junio C Hamano
2019-07-12 13:50                   ` Sergey Organov
2019-07-12 16:24                     ` Elijah Newren
2019-07-15 12:08                       ` Sergey Organov
2019-07-12 18:33                     ` Junio C Hamano
2019-07-15 12:47                       ` Sergey Organov
2019-07-15 16:57                         ` Junio C Hamano
2019-07-19 11:00                           ` Sergey Organov
2019-07-11 15:46             ` brian m. carlson
2019-07-10 14:36       ` Sergey Organov

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=xmqqa7dnw9b1.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=usbuser@mailbox.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.
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).