git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rebase with preserve merges should not show merged commits
@ 2008-03-22  1:19 Jörg Sommer
  2008-03-22  1:19 ` [PATCH] Check for non‐foreign commits in rebase-interactive test Jörg Sommer
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Jörg Sommer @ 2008-03-22  1:19 UTC (permalink / raw)
  To: git; +Cc: gitster, Jörg Sommer

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..3879841 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
@@ -523,7 +525,7 @@ do
 		SHORTONTO=$(git rev-parse --short $ONTO)
 		git rev-list $MERGES_OPTION --pretty=oneline --abbrev-commit \
 			--abbrev=7 --reverse --left-right --cherry-pick \
-			$UPSTREAM...$HEAD | \
+			--first-parent $UPSTREAM...$HEAD | \
 			sed -n "s/^>/pick /p" > "$TODO"
 		cat >> "$TODO" << EOF
 
-- 
1.5.4.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2008-03-22 15:57 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-22  1:19 [PATCH] rebase with preserve merges should not show merged commits Jörg Sommer
2008-03-22  1:19 ` [PATCH] Check for non‐foreign commits in rebase-interactive test Jörg Sommer
2008-03-22  1:19   ` [PATCH] Handle fast forward correctly in rebase with preserve merges Jörg Sommer
2008-03-22  1:19     ` [PATCH] New tests to check " Jörg Sommer
2008-03-22  1:33 ` [PATCH] rebase with preserve merges should not show merged commits Johannes Schindelin
2008-03-22  9:43   ` Jörg Sommer
2008-03-22 11:22     ` Johannes Schindelin
2008-03-22  1:52 ` Björn Steinbrink
2008-03-22  9:40   ` Jörg Sommer
2008-03-22 12:37     ` Björn Steinbrink
2008-03-22 14:06   ` Jörg Sommer
2008-03-22 15:12     ` Björn Steinbrink
2008-03-22 15:37       ` Jörg Sommer
2008-03-22 14:08 ` [PATCH v2 1/5] " Jörg Sommer
2008-03-22 14:08   ` [PATCH v2 2/5] New test: no merges without preserve merges Jörg Sommer
2008-03-22 14:08     ` [PATCH v2 3/5] Check for non‐foreign commits in rebase-interactive test Jörg Sommer
2008-03-22 14:08       ` [PATCH v2 4/5] Handle fast forward correctly in rebase with preserve merges Jörg Sommer
2008-03-22 14:08         ` [PATCH v2 5/5] New tests to check " Jörg Sommer
2008-03-22 14:46   ` [PATCH v2 1/5] rebase with preserve merges should not show merged commits Johannes Schindelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).