diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-02-07 15:14:22 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-02-07 15:14:22 -0800 |
commit | 427c6d0caf0caee5ad2c4925910a6b8ebcf95408 (patch) | |
tree | ea73fd905a86866dfb95976b13f2e1cda00bbd67 /t | |
parent | 45bb6cbb49699a64196ed866c4809cd8267bd481 (diff) | |
parent | e28efb1998bb0b73057de13b9568f6aef439a583 (diff) | |
download | git-427c6d0caf0caee5ad2c4925910a6b8ebcf95408.tar.gz |
Merge branch 'jc/fake-ancestor-with-non-blobs' into maint
Rebasing the history of superproject with change in the submodule
has been broken since v1.7.12.
* jc/fake-ancestor-with-non-blobs:
apply: diagnose incomplete submodule object name better
apply: simplify build_fake_ancestor()
git-am: record full index line in the patch used while rebasing
Diffstat (limited to 't')
-rwxr-xr-x | t/t7402-submodule-rebase.sh | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/t/t7402-submodule-rebase.sh b/t/t7402-submodule-rebase.sh index f919c8d34d..8e32f19007 100755 --- a/t/t7402-submodule-rebase.sh +++ b/t/t7402-submodule-rebase.sh @@ -3,7 +3,7 @@ # Copyright (c) 2008 Johannes Schindelin # -test_description='Test rebasing and stashing with dirty submodules' +test_description='Test rebasing, stashing, etc. with submodules' . ./test-lib.sh @@ -20,7 +20,8 @@ test_expect_success setup ' echo second line >> file && (cd submodule && git pull) && test_tick && - git commit -m file-and-submodule -a + git commit -m file-and-submodule -a && + git branch added-submodule ' @@ -89,4 +90,29 @@ test_expect_success 'stash with a dirty submodule' ' ' +test_expect_success 'rebasing submodule that should conflict' ' + git reset --hard && + git checkout added-submodule && + git add submodule && + test_tick && + git commit -m third && + ( + cd submodule && + git commit --allow-empty -m extra + ) && + git add submodule && + test_tick && + git commit -m fourth && + + test_must_fail git rebase --onto HEAD^^ HEAD^ HEAD^0 && + git ls-files -s submodule >actual && + ( + cd submodule && + echo "160000 $(git rev-parse HEAD^) 1 submodule" && + echo "160000 $(git rev-parse HEAD^^) 2 submodule" && + echo "160000 $(git rev-parse HEAD) 3 submodule" + ) >expect && + test_cmp expect actual +' + test_done |