[PATCH v2 1/5] rebase with preserve merges should not show merged commits

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git@...>
Cc: <gitster@...>, Jörg Sommer <joerg@...>
Date: Saturday, March 22, 2008 - 10:08 am

The current version of git-rebase--interactive shows the user the commits
coming from a merge.

M---A---B
 \       \
  o---o---+---o branch

Rebasing branch on M with preserve merges gives the commits A and B. But
if you mark them for editing or remove them the rebase fails. You must
keep them as they are. It's useless to bother the user with these commits
and might lead to mistakes.

Signed-off-by: Jörg Sommer <joerg@alea.gnuu.de>
---
 git-rebase--interactive.sh |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 8aa7371..e1ce44e 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -162,6 +162,8 @@ pick_one_preserving_merges () {
 				new_parents="$new_parents $new_p"
 				;;
 			esac
+		else
+			new_parents="$new_parents $p"
 		fi
 	done
 	case $fast_forward in
@@ -513,7 +515,7 @@ do
 				echo $ONTO > "$REWRITTEN"/$c ||
 					die "Could not init rewritten commits"
 			done
-			MERGES_OPTION=
+			MERGES_OPTION=--first-parent
 		else
 			MERGES_OPTION=--no-merges
 		fi
-- 
1.5.4.4

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] rebase with preserve merges should not show merg..., Johannes Schindelin, (Fri Mar 21, 9:33 pm)
Re: [PATCH] rebase with preserve merges should not show merg..., Johannes Schindelin, (Sat Mar 22, 7:22 am)
[PATCH v2 1/5] rebase with preserve merges should not show m..., Jörg Sommer, (Sat Mar 22, 10:08 am)
Re: [PATCH v2 1/5] rebase with preserve merges should not sh..., Johannes Schindelin, (Sat Mar 22, 10:46 am)
[PATCH v2 3/5] , Jörg Sommer, (Sat Mar 22, 10:08 am)
[PATCH] , Jörg Sommer, (Fri Mar 21, 9:19 pm)
[PATCH] New tests to check rebase with preserve merges, Jörg Sommer, (Fri Mar 21, 9:19 pm)