From: Paul Smith <paul@mad-scientist.net>
To: git@vger.kernel.org
Subject: Why does git merge --squash fail when merge.ff is set to only?
Date: Wed, 26 Nov 2014 14:42:57 -0500 [thread overview]
Message-ID: <1417030977.23650.42.camel@homebase> (raw)
In our development process we always want to do rebase and only rarely
create merge commits, and so we have a recommendation to set the
merge.ff configuration attribute to "only".
This is great, however it appears to break git merge --squash (which we
also use constantly).
If I'm squash-merging from a branch which is not based on HEAD (cannot
use fast-forwarding) then I get the extremely cryptic error:
$ git checkout master
$ git pull
$ git merge --squash my-branch
fatal: Not possible to fast-forward, aborting.
I couldn't even understand what this error meant for a while: what was
being fast-forwarded here anyway? It took me a lot of thought to
realize it was related to the merge.ff config setting.
Eventually I figured it out, and now have this workaround:
$ git merge --ff --squash my-branch
But, shouldn't we consider this a bug? I don't see any reason why
--squash should pay attention to the ff config setting, or command line
flags either for that matter. IMHO when you add the --squash flag, the
ff options/config should be ignored.
Or, am I missing some subtle issue here?
next reply other threads:[~2014-11-26 19:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-26 19:42 Paul Smith [this message]
2014-11-26 21:32 ` Why does git merge --squash fail when merge.ff is set to only? 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=1417030977.23650.42.camel@homebase \
--to=paul@mad-scientist.net \
--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 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).