summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-05-01 21:11:26 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-05-01 21:11:26 -0700
commita4da3388fd83e4b31273d71bebf8a92becd8f60c (patch)
tree1d86a52290e732be24076f875203f82941e1e500 /t
parentMerge branch 'maint' of https://github.com/git-l10n/git-po (diff)
parentrebase -i continue: don't skip commits that only change submodules (diff)
downloadtgif-a4da3388fd83e4b31273d71bebf8a92becd8f60c.tar.xz
Merge branch 'jk/rebase-i-submodule-conflict-only' into maint
Giving "--continue" to a conflicted "rebase -i" session skipped a commit that only results in changes to submodules. By John Keeping * jk/rebase-i-submodule-conflict-only: rebase -i continue: don't skip commits that only change submodules
Diffstat (limited to 't')
-rwxr-xr-xt/t3404-rebase-interactive.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index b981572d73..7fd2127625 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -624,8 +624,38 @@ test_expect_success 'submodule rebase -i' '
FAKE_LINES="1 squash 2 3" git rebase -i A
'
+test_expect_success 'submodule conflict setup' '
+ git tag submodule-base &&
+ git checkout HEAD^ &&
+ (
+ cd sub && git checkout HEAD^ && echo 4 >elif &&
+ git add elif && git commit -m "submodule conflict"
+ ) &&
+ git add sub &&
+ test_tick &&
+ git commit -m "Conflict in submodule" &&
+ git tag submodule-topic
+'
+
+test_expect_success 'rebase -i continue with only submodule staged' '
+ test_must_fail git rebase -i submodule-base &&
+ git add sub &&
+ git rebase --continue &&
+ test $(git rev-parse submodule-base) != $(git rev-parse HEAD)
+'
+
+test_expect_success 'rebase -i continue with unstaged submodule' '
+ git checkout submodule-topic &&
+ git reset --hard &&
+ test_must_fail git rebase -i submodule-base &&
+ git reset &&
+ git rebase --continue &&
+ test $(git rev-parse submodule-base) = $(git rev-parse HEAD)
+'
+
test_expect_success 'avoid unnecessary reset' '
git checkout master &&
+ git reset --hard &&
test-chmtime =123456789 file3 &&
git update-index --refresh &&
HEAD=$(git rev-parse HEAD) &&