git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Robert Dailey <rcdailey.lists@gmail.com>
Cc: Git <git@vger.kernel.org>, Paul Smith <paul@mad-scientist.net>
Subject: Re: Can't squash merge with merge.ff set to false
Date: Fri, 5 Jan 2018 16:11:31 -0800	[thread overview]
Message-ID: <20180106001131.GA54183@aiede.mtv.corp.google.com> (raw)
In-Reply-To: <CAHd499C=3Y-ykgYZhSJzk=e-Pi6BUFeN8C89krd5T7T5fRB91g@mail.gmail.com>

Hi,

Robert Dailey wrote:

> Not sure if this is intended or a bug, but with the following configuration:
>
> $ git config --global merge.ff false
>
> I am not able to merge my topic branch into master with squash option:
>
> $ git checkout master
> $ git merge --squash topic
> fatal: You cannot combine --squash with --no-ff.

I see two issues here:

 1. The check and error message really only make sense when you passed
    --no-ff directly, not implicitly using config.  The problem you
    are running into was presumably introduced when merge.ff was added
    in v1.7.6-rc0~67^2~1 (2011-05-06).

 2. Whether it comes from an alias or config, --no-ff and --squash are
    not fundamentally incompatible.  --no-ff says not to do something
    and --squash says to do a different thing, so --squash should win.

So I suspect that making --squash override --no-ff would be a
reasonable behavior.

Care to write a patch?

Thanks,
Jonathan

      parent reply	other threads:[~2018-01-06  0:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-05 19:59 Can't squash merge with merge.ff set to false Robert Dailey
2018-01-05 20:12 ` Bryan Turner
2018-01-05 20:26   ` Paul Smith
2018-01-05 20:35     ` Robert Dailey
2018-01-05 20:54       ` Bryan Turner
2018-01-05 21:44         ` Robert Dailey
2018-01-06  0:11 ` Jonathan Nieder [this message]

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=20180106001131.GA54183@aiede.mtv.corp.google.com \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=paul@mad-scientist.net \
    --cc=rcdailey.lists@gmail.com \
    /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).