summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 29f4ad8)
raw | patch | inline | side by side (parent: 29f4ad8)
author | Eric Wong <normalperson@yhbt.net> | |
Sun, 25 Jun 2006 01:29:47 +0000 (18:29 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 25 Jun 2006 07:38:34 +0000 (00:38 -0700) |
Enhance t3401-rebase-partial to test with --merge as well as
the standard am -3 strategy.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
the standard am -3 strategy.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-rebase.sh | patch | blob | history | |
t/t3401-rebase-partial.sh | patch | blob | history |
diff --git a/git-rebase.sh b/git-rebase.sh
index 91594775e6aad4ebe924506e779c51ea5333ad37..53fb14ed885b801394c61d5f61ed4b1cab22ce74 100755 (executable)
--- a/git-rebase.sh
+++ b/git-rebase.sh
rv=$?
case "$rv" in
0)
- git-commit -C "$cmt" || die "commit failed: $MRESOLVEMSG"
+ if test -n "`git-diff-index HEAD`"
+ then
+ git-commit -C "$cmt" || die "commit failed: $MRESOLVEMSG"
+ fi
;;
1)
test -d "$GIT_DIR/rr-cache" && git-rerere
do
git-read-tree `cat "$dotest/cmt.$msgnum.result"`
git-checkout-index -q -f -u -a
- git-commit -C "`cat $dotest/cmt.$msgnum`"
-
- printf "Committed %0${prec}d" $msgnum
+ if test -n "`git-diff-index HEAD`"
+ then
+ git-commit -C "`cat $dotest/cmt.$msgnum`"
+ printf "Committed %0${prec}d" $msgnum
+ else
+ printf "Already applied: %0${prec}d" $msgnum
+ fi
echo ' '`git-rev-list --pretty=oneline -1 HEAD | \
sed 's/^[a-f0-9]\+ //'`
msgnum=$(($msgnum + 1))
index 32dc9c5e74e80e2483ae0bf49f3dfd549c6d8471..360a67060e1d1fd501fed7729712213360c456b2 100755 (executable)
test_expect_success \
'pick top patch from topic branch into master' \
'git-cherry-pick my-topic-branch^0 &&
- git-checkout -f my-topic-branch
+ git-checkout -f my-topic-branch &&
+ git-branch master-merge master &&
+ git-branch my-topic-branch-merge my-topic-branch
'
test_debug \
'rebase topic branch against new master and check git-am did not get halted' \
'git-rebase master && test ! -d .dotest'
+if test -z "$no_python"
+then
+ test_expect_success \
+ 'rebase --merge topic branch that was partially merged upstream' \
+ 'git-checkout -f my-topic-branch-merge &&
+ git-rebase --merge master-merge &&
+ test ! -d .git/.dotest-merge'
+fi
+
test_done