summaryrefslogtreecommitdiff
path: root/t/t3404-rebase-interactive.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2011-10-15 20:46:36 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-10-15 20:46:36 -0700
commit57ded055c419183e43fd7841c1f9d2e774fa96e3 (patch)
tree27a85cbd111b7ee0441a050b998259f0291991e0 /t/t3404-rebase-interactive.sh
parentt1304: fall back to $USER if $LOGNAME is not defined (diff)
parentrebase -i: notice and warn if "exec $cmd" modifies the index or the working tree (diff)
downloadtgif-57ded055c419183e43fd7841c1f9d2e774fa96e3.tar.xz
Merge branch 'mm/rebase-i-exec-edit' into maint
* mm/rebase-i-exec-edit: rebase -i: notice and warn if "exec $cmd" modifies the index or the working tree rebase -i: clean error message for --continue after failed exec
Diffstat (limited to 't/t3404-rebase-interactive.sh')
-rwxr-xr-xt/t3404-rebase-interactive.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 8538813d1d..b981572d73 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -527,6 +527,20 @@ test_expect_success 'auto-amend only edited commits after "edit"' '
git rebase --abort
'
+test_expect_success 'clean error after failed "exec"' '
+ test_tick &&
+ test_when_finished "git rebase --abort || :" &&
+ (
+ FAKE_LINES="1 exec_false" &&
+ export FAKE_LINES &&
+ test_must_fail git rebase -i HEAD^
+ ) &&
+ echo "edited again" > file7 &&
+ git add file7 &&
+ test_must_fail git rebase --continue 2>error &&
+ grep "You have staged changes in your working tree." error
+'
+
test_expect_success 'rebase a detached HEAD' '
grandparent=$(git rev-parse HEAD~2) &&
git checkout $(git rev-parse HEAD) &&