mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] Documentation/merge-options: clarify --squash behavior
@ 2019-04-24 21:22 Vishal Verma
  2019-04-25  4:16 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Vishal Verma @ 2019-04-24 21:22 UTC (permalink / raw)
  To: git; +Cc: Rafael Ascensão, Vishal Verma

Add a note to the --squash option for git-merge to clarify its behavior
with respect to --commit. When --squash is supplied, 'option_commit' is
silently dropped. This can be surprising to a user who tries to override
the no-commit behavior of squash using --commit explicitly.

Signed-off-by: Vishal Verma <>

There may be an argument to make --commit 'just work' with squash, but
that might involve changing option_commit from OPT_BOOL to something
that can distinguish between the default, what's requested on the
command line, or the --no- version.

 Documentation/merge-options.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/merge-options.txt b/Documentation/merge-options.txt
index 92a7d936c1..0fd97720d8 100644
--- a/Documentation/merge-options.txt
+++ b/Documentation/merge-options.txt
@@ -95,6 +95,9 @@ merge.
 With --no-squash perform the merge and commit the result. This
 option can be used to override --squash.
+With --squash, a --commit option does not make sense, and will be ignored
+(HEAD will not be moved in spite of --commit).
 -s <strategy>::

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-04-26 21:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-24 21:22 [PATCH] Documentation/merge-options: clarify --squash behavior Vishal Verma
2019-04-25  4:16 ` Junio C Hamano
2019-04-25 16:26   ` Vishal Verma
2019-04-26 21:17     ` [PATCH v2] builtin/merges: clarify --squash behavior with --commit vishal

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