mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <>
To: Vishal Verma <>
Cc:, "Vishal Verma" <>,
	"Rafael Ascensão" <>,
	"Johannes Schindelin" <>
Subject: Re: [PATCH v4] merge: refuse --commit with --squash
Date: Tue, 28 May 2019 12:07:29 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <> (Vishal Verma's message of "Fri, 24 May 2019 12:36:17 -0600")

Vishal Verma <> writes:

> From: Vishal Verma <>
> Convert option_commit to tristate, representing the states of
> 'default/untouched', 'enabled-by-cli', 'disabled-by-cli'. With this in
> place, check whether option_commit was enabled by cli when squashing a
> merge. If so, error out, as this is not supported.
> Previously, when --squash was supplied, 'option_commit' was silently
> dropped. This could have been surprising to a user who tried to override
> the no-commit behavior of squash using --commit explicitly.
> Add a note to the --squash option for git-merge to clarify the
> incompatibility, and add a test case to
> Cc: Junio C Hamano <>
> Cc: Rafael Ascensão <>
> Cc: Johannes Schindelin <>
> Signed-off-by: Vishal Verma <>
> ---

I personally feel that "merge --squash --commit" that does not
complain and leaves the result in the working tree to be tweaked and
then committed is perfectly fine, especially given that the reason
why "--commit" option exists is primarily because we need to allow
"--no-commit" to stop the normal merge from recording the result in
a new commit.

A user who really wanted to record what a merge would bring to the
current state in a single-parent commit would have to do "git
commit" after that anyway, and with this patch, the user would
instead need to run the same "git merge" command again, without
"--commit", before being able to do so, so in the sense, it is
likely that this change makes it more cumbersome to use for such a
user to use the command. 

But I guess that this change will give an incentive to actually
allow the combination to "just work" by making it more obvious that
the combination is not supported, so it would be a slight
improvement in that sense ;-)

      reply	other threads:[~2019-05-28 19:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-23 22:53 [PATCH v3] builtin/merges: clarify --squash behavior with --commit Vishal Verma
2019-05-24 18:36 ` [PATCH v4] merge: refuse --commit with --squash Vishal Verma
2019-05-28 19:07   ` Junio C Hamano [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:

  List information:

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

  git send-email \ \ \ \ \ \ \ \

* 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

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).