aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorThomas Rast <trast@student.ethz.ch>2008-08-13 23:41:23 +0200
committerJunio C Hamano <gitster@pobox.com>2008-08-13 15:17:09 -0700
commit71d9451e061841ed5acb576652e09df32c700b86 (patch)
tree7321f90e5de8513ad28b82aaebc747657ef10b39 /t
parent65f59e2998c7dd87f61b25fa41bba72fd4247901 (diff)
downloadgit-71d9451e061841ed5acb576652e09df32c700b86.tar.gz
git-71d9451e061841ed5acb576652e09df32c700b86.tar.xz
rebase -i -p: handle index and workdir correctly
'git rebase -i -p' forgot to update the index and working directory during fast forwards. Fix this. Makes 'GIT_EDITOR=true rebase -i -p <ancestor>' a no-op again. Also, it attempted to do a fast forward even if it was instructed not to commit (via -n). Fall back to the cherry-pick code path and let that handle the issue for us. Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Diffstat (limited to 't')
-rwxr-xr-xt/t3404-rebase-interactive.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index ffe3dd97b..4d62b9af8 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -202,6 +202,9 @@ test_expect_success 'retain authorship when squashing' '
test_expect_success '-p handles "no changes" gracefully' '
HEAD=$(git rev-parse HEAD) &&
git rebase -i -p HEAD^ &&
+ git update-index --refresh &&
+ git diff-files --quiet &&
+ git diff-index --quiet --cached HEAD -- &&
test $HEAD = $(git rev-parse HEAD)
'
@@ -235,6 +238,9 @@ test_expect_success 'preserve merges with -p' '
git checkout -b to-be-rebased &&
test_tick &&
git rebase -i -p --onto branch1 master &&
+ git update-index --refresh &&
+ git diff-files --quiet &&
+ git diff-index --quiet --cached HEAD -- &&
test $(git rev-parse HEAD~6) = $(git rev-parse branch1) &&
test $(git rev-parse HEAD~4^2) = $(git rev-parse to-be-preserved) &&
test $(git rev-parse HEAD^^2^) = $(git rev-parse HEAD^^^) &&