list mirror (unofficial, one of many)
 help / color / Atom feed
From: Anatoly Borodin <>
Subject: Why "You cannot combine --squash with --no-ff" in git merge?
Date: Tue, 21 Mar 2017 01:57:13 +0000 (UTC)
Message-ID: <oaq19p$kpo$> (raw)

Hi All,

the message "You cannot combine --squash with --no-ff" appeared in 2008,
in the commit 1c7b76be7d620bbaf2e6b8417f04012326bbb9df ("Build in
merge"). I don't understand the logic of this restriction.

Imagine, I have the following branches, where A is a master and B is a
feature branch:


`git checkout A && git merge --squash --no-ff B` says:

	fatal: You cannot combine --squash with --no-ff.

`git merge --squash --ff` will happily move the A ref to the B commit.

But what I want, and expect, is:


where B' has the same tree as B.

This can of course be done with `git rebase --interactive` and marking
all commits for squash or fixup. But `git merge --squash` works with
not-fastforwarding feature branch, why should it refuse to work in a
fastforwarding case?

Mit freundlichen Grüßen,
Anatoly Borodin

             reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-21  1:57 Anatoly Borodin [this message]
2017-03-21  2:11 ` Anatoly Borodin

Reply instructions:

You may reply publically 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:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='oaq19p$kpo$' \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link list mirror (unofficial, one of many)

Archives are clonable:
	git clone --mirror
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Newsgroups are available over NNTP:

 note: .onion URLs require Tor:

AGPL code for this site: git clone public-inbox