git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Documentation/merge-options: clarify --squash behavior

From
VVVishal Verma <vishal.l.verma@intel.com>
Date
Apr 24, 2019, 21:22 UTC
Message-ID
<20190424212212.10039-1-vishal.l.verma@intel.com>

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 <vishal.l.verma@intel.com>
---

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>::
 --strategy=<strategy>::
-- 
2.20.1
Next: Junio C Hamano
Message 1 of 4 in “Documentation/merge-options: clarify --squash behavior”
  1. Documentation/merge-options: clarify --squash behaviorVishal Verma, Apr 24, 2019
  2. Junio C HamanoApr 25, 2019
  3. Vishal VermaApr 25, 2019
  4. builtin/merges: clarify --squash behavior with --commitvishal@kernel.org, Apr 26, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.