summaryrefslogtreecommitdiff
path: root/git-rebase--interactive.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-08-01 15:59:35 +0100
committerJunio C Hamano <gitster@pobox.com>2007-08-01 17:56:28 -0700
commit96ffe892e307ea512abbc633f822558c568cece1 (patch)
tree2f17e2028ae01cc2097b7eacfb819fd402b7233d /git-rebase--interactive.sh
parent420acb31acbfbd78e0c35ac0c614de8717daed0a (diff)
downloadgit-96ffe892e307ea512abbc633f822558c568cece1.tar.gz
rebase -i: ignore patches that are already in the upstream
Non-interactive rebase had this from the beginning -- match it by using --cherry-pick option to rev-list. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase--interactive.sh')
-rwxr-xr-xgit-rebase--interactive.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 061cd0a69e..d3addd4290 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -463,8 +463,9 @@ do
#
EOF
git rev-list $MERGES_OPTION --pretty=oneline --abbrev-commit \
- --abbrev=7 --reverse $UPSTREAM..$HEAD | \
- sed "s/^/pick /" >> "$TODO"
+ --abbrev=7 --reverse --left-right --cherry-pick \
+ $UPSTREAM...$HEAD | \
+ sed -n "s/^>/pick /p" >> "$TODO"
test -z "$(grep -ve '^$' -e '^#' < $TODO)" &&
die_abort "Nothing to do"