From: Jonathan Nieder Date: Sat, 06 Jan 2018 00:11:31 GMT Subject: Re: Can't squash merge with merge.ff set to false Message-ID: <20180106001131.GA54183@aiede.mtv.corp.google.com> In-Reply-To: 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