diff options
author | Eric Sunshine <sunshine@sunshineco.com> | 2018-07-02 02:23:45 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-07-03 21:38:04 +0200 |
commit | e5d7e9f5164e90386622a80a9dfc4b1675bcc92b (patch) | |
tree | 249acfc3c5eea951be98009729ce9e268adf291b /t/lib-submodule-update.sh | |
parent | t: drop unnecessary terminating semicolon in subshell (diff) | |
download | git-e5d7e9f5164e90386622a80a9dfc4b1675bcc92b.tar.xz git-e5d7e9f5164e90386622a80a9dfc4b1675bcc92b.zip |
t/lib-submodule-update: fix "absorbing" test
This test has been dysfunctional since it was added by 259f3ee296
(lib-submodule-update.sh: define tests for recursing into submodules,
2017-03-14), however, the problem went unnoticed due to a broken
&&-chain.
The test wants to verify that replacing a submodule containing a .git
directory will absorb the .git directory into the .git/modules/ of the
superproject, and then replace the working tree content appropriate to
the superproject. It is, therefore, incorrect to check if the
submodule content still exists since the submodule will have been
replaced by the content of the superproject.
Fix this by removing the submodule content check, which also happens
to be the line that broke the &&-chain.
While at it, fix broken &&-chains in a couple neighboring tests.
Helped-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/lib-submodule-update.sh')
-rwxr-xr-x | t/lib-submodule-update.sh | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh index 1f38a85371..e90ec79087 100755 --- a/t/lib-submodule-update.sh +++ b/t/lib-submodule-update.sh @@ -755,7 +755,7 @@ test_submodule_recursing_with_args_common() { : >sub1/untrackedfile && test_must_fail $command replace_sub1_with_file && test_superproject_content origin/add_sub1 && - test_submodule_content sub1 origin/add_sub1 + test_submodule_content sub1 origin/add_sub1 && test -f sub1/untracked_file ) ' @@ -842,7 +842,7 @@ test_submodule_switch_recursing_with_args () { cd submodule_update && git branch -t add_sub1 origin/add_sub1 && : >sub1 && - echo sub1 >.git/info/exclude + echo sub1 >.git/info/exclude && $command add_sub1 && test_superproject_content origin/add_sub1 && test_submodule_content sub1 origin/add_sub1 @@ -969,7 +969,6 @@ test_submodule_forced_switch_recursing_with_args () { rm -rf .git/modules/sub1 && $command replace_sub1_with_directory && test_superproject_content origin/replace_sub1_with_directory && - test_submodule_content sub1 origin/modify_sub1 test_git_directory_exists sub1 ) ' |