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

[PATCH] rebase -p: Preserve --no-ff merges

From
Anders Kaseorg <andersk@mit.edu>
Date
Mar 20, 2009, 20:38 UTC
Message-ID
<alpine.DEB.2.00.0903201633440.4457@vinegar-pot.mit.edu>

Previously, git rebase -p would turn some merges that had been constructed with git merge --no-ff into fast-forwards. Now it reconstructs those merges using --no-ff as well.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
---
 git-rebase--interactive.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 3dc659d..39545cc 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -275,7 +275,7 @@ pick_one_preserving_merges () {
 			if ! GIT_AUTHOR_NAME="$GIT_AUTHOR_NAME" \
 				GIT_AUTHOR_EMAIL="$GIT_AUTHOR_EMAIL" \
 				GIT_AUTHOR_DATE="$GIT_AUTHOR_DATE" \
-				output git merge $STRATEGY -m "$msg" \
+				output git merge --no-ff $STRATEGY -m "$msg" \
 					$new_parents
 			then
 				printf "%s\n" "$msg" > "$GIT_DIR"/MERGE_MSG
-- 
1.6.2
Next: Johannes Schindelin
Message 1 of 2 in “rebase -p: Preserve --no-ff merges”
  1. rebase -p: Preserve --no-ff mergesAnders Kaseorg, Mar 20, 2009
  2. Johannes SchindelinMar 20, 2009

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.