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

Subsystems: the rest

DORMANTno replies

5 messages, 2 authors, 2016-06-15 · open the first message on its own page

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

From: Stephan Beyer <hidden>
Date: 2016-06-15 22:44:57

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 <redacted>
---
 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

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

From: Stephan Beyer <hidden>
Date: 2016-06-15 22:44:57

I have to admit that the subject is pretty ambiguous.

Sorry :) I should go to bed.
  Stephan

-- 
Stephan Beyer [off-list ref], PGP 0x6EDDD207FCC5040F

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

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:44:57

Hi,

On Wed, 16 Jul 2008, Stephan Beyer wrote:
This patch fixes two issues for rebase -i with preserving
merges of unrelated branches.
Two?  What's the second?

Patch is obviously good.

Thanks,
Dscho

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

From: Stephan Beyer <hidden>
Date: 2016-06-15 22:44:57

Hi,

Johannes Schindelin wrote:
Hi,

On Wed, 16 Jul 2008, Stephan Beyer wrote:
quoted
This patch fixes two issues for rebase -i with preserving
merges of unrelated branches.
Two?  What's the second?
Oh, eh, well ;)
It's only one bug, but it results in two different behaviors...
If you have a merge with more than two parents and not all are lost,
then it merges with too few parents.
If you have a merge with exactly two parents and one is lost, then
it tries to cherry-pick (with an error).
"Two" "issues" :)

Regards.
  Stephan

-- 
Stephan Beyer [off-list ref], PGP 0x6EDDD207FCC5040F

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

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:44:57

Hi,

On Wed, 16 Jul 2008, Stephan Beyer wrote:
Johannes Schindelin wrote:
quoted
On Wed, 16 Jul 2008, Stephan Beyer wrote:
quoted
This patch fixes two issues for rebase -i with preserving merges of 
unrelated branches.
Two?  What's the second?
Oh, eh, well ;)
It's only one bug, but it results in two different behaviors...
Ah, okay.  Worthwhile clarifying in the commit message.

Thanks for the patch,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help