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

[PATCH] rebase-i: keep old parents when preserving merges

From
Stephan Beyer <s-beyer@gmx.net>
Date
Jul 16, 2008, 01:51 UTC
Message-ID
<1216173109-11155-1-git-send-email-s-beyer@gmx.net>

This patch fixes two issues for rebase -i with preserving merges of unrelated branches.

Merge parents that are part of an unrelated branch have not been kept as a parent in some cases. That means, a rewritten merge commit has either lost a parent or rebase tried to cherry-pick this merge commit which resulted in an error.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
---
 git-rebase--interactive.sh |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index a35212d..0df7640 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -174,6 +174,8 @@ pick_one_preserving_merges () {
 				new_parents="$new_parents $new_p"
 				;;
 			esac
+		else
+			new_parents="$new_parents $p"
 		fi
 	done
 	case $fast_forward in
-- 
1.5.6.3.357.ge6ecd
Next: Stephan Beyer
Message 1 of 7 in “rebase-i: keep old parents when preserving merges”
  1. rebase-i: keep old parents when preserving mergesStephan Beyer, Jul 16, 2008
  2. Stephan BeyerJul 16, 2008
  3. Johannes SchindelinJul 16, 2008
  4. Stephan BeyerJul 16, 2008
  5. Johannes SchindelinJul 16, 2008
  6. Junio C HamanoJul 16, 2008
  7. Stephan BeyerJul 16, 2008

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.