summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2010-06-22 09:31:48 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-06-22 09:31:48 -0700
commitb2ebbd8f1311608622ede7a1286839ef64edfc86 (patch)
treed0967e6b40cfd76242c7447f22c2b70958fb863d /t
parentMerge branch 'cc/maint-commit-reflog-msg' into maint (diff)
parentrebase -i: Abort cleanly if new base cannot be checked out (diff)
downloadtgif-b2ebbd8f1311608622ede7a1286839ef64edfc86.tar.xz
Merge branch 'ic/maint-rebase-i-abort' into maint
* ic/maint-rebase-i-abort: rebase -i: Abort cleanly if new base cannot be checked out
Diffstat (limited to 't')
-rwxr-xr-xt/t3404-rebase-interactive.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 6668907ec5..ee9a1b25e6 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -146,6 +146,16 @@ test_expect_success 'abort' '
! test -d .git/rebase-merge
'
+test_expect_success 'abort with error when new base cannot be checked out' '
+ git rm --cached file1 &&
+ git commit -m "remove file in base" &&
+ test_must_fail git rebase -i master > output 2>&1 &&
+ grep "Untracked working tree file .file1. would be overwritten" \
+ output &&
+ ! test -d .git/rebase-merge &&
+ git reset --hard HEAD^
+'
+
test_expect_success 'retain authorship' '
echo A > file7 &&
git add file7 &&