diff options
author | Vincent Ambo <tazjin@google.com> | 2020-05-25T23·06+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-05-25T23·06+0100 |
commit | 93ba78d6f4632ef1c5228965e3edc8c0faf88c1e (patch) | |
tree | 85730c182a9f5f492ade8e8ccdb1c2356f9900bd /third_party/git/t/t7400-submodule-basic.sh | |
parent | 6f8fbf4aa4b1654ab27d4829e114538761817de0 (diff) |
revert(3p/git): Revert merge of git upstream at v2.26.2 r/852
This causes cgit to serve error pages, which is undesirable. This reverts commit 5229c9b232de5bfa959ad6ebbb4c8192ac513352, reversing changes made to f2b211131f2347342dde63975b09cf603149f1a3.
Diffstat (limited to 'third_party/git/t/t7400-submodule-basic.sh')
-rwxr-xr-x | third_party/git/t/t7400-submodule-basic.sh | 64 |
1 files changed, 4 insertions, 60 deletions
diff --git a/third_party/git/t/t7400-submodule-basic.sh b/third_party/git/t/t7400-submodule-basic.sh index e3e2aab3b0a1..a208cb26e1df 100755 --- a/third_party/git/t/t7400-submodule-basic.sh +++ b/third_party/git/t/t7400-submodule-basic.sh @@ -55,21 +55,6 @@ test_expect_success 'add aborts on repository with no commits' ' test_i18ncmp expect actual ' -test_expect_success 'status should ignore inner git repo when not added' ' - rm -fr inner && - mkdir inner && - ( - cd inner && - git init && - >t && - git add t && - git commit -m "initial" - ) && - test_must_fail git submodule status inner 2>output.err && - rm -fr inner && - test_i18ngrep "^error: .*did not match any file(s) known to git" output.err -' - test_expect_success 'setup - repository in init subdirectory' ' mkdir init && ( @@ -171,11 +156,9 @@ test_expect_success 'submodule add to .gitignored path fails' ' ( cd addtest-ignore && cat <<-\EOF >expect && - The following paths are ignored by one of your .gitignore files: + The following path is ignored by one of your .gitignore files: submod - hint: Use -f if you really want to add them. - hint: Turn this message off by running - hint: "git config advice.addIgnoredFile false" + Use -f if you really want to add it. EOF # Does not use test_commit due to the ignore echo "*" > .gitignore && @@ -208,17 +191,6 @@ test_expect_success 'submodule add to reconfigure existing submodule with --forc ) ' -test_expect_success 'submodule add relays add --dry-run stderr' ' - test_when_finished "rm -rf addtest/.git/index.lock" && - ( - cd addtest && - : >.git/index.lock && - ! git submodule add "$submodurl" sub-while-locked 2>output.err && - test_i18ngrep "^fatal: .*index\.lock" output.err && - test_path_is_missing sub-while-locked - ) -' - test_expect_success 'submodule add --branch' ' echo "refs/heads/initial" >expect-head && cat <<-\EOF >expect-heads && @@ -384,28 +356,6 @@ test_expect_success 'status should only print one line' ' test_line_count = 1 lines ' -test_expect_success 'status from subdirectory should have the same SHA1' ' - test_when_finished "rmdir addtest/subdir" && - ( - cd addtest && - mkdir subdir && - git submodule status >output && - awk "{print \$1}" <output >expect && - cd subdir && - git submodule status >../output && - awk "{print \$1}" <../output >../actual && - test_cmp ../expect ../actual && - git -C ../submod checkout HEAD^ && - git submodule status >../output && - awk "{print \$1}" <../output >../actual2 && - cd .. && - git submodule status >output && - awk "{print \$1}" <output >expect2 && - test_cmp expect2 actual2 && - ! test_cmp actual actual2 - ) -' - test_expect_success 'setup - fetch commit name from submodule' ' rev1=$(cd .subrepo && git rev-parse HEAD) && printf "rev1: %s\n" "$rev1" && @@ -427,14 +377,6 @@ test_expect_success 'init should register submodule url in .git/config' ' test_cmp expect url ' -test_expect_success 'status should still be "missing" after initializing' ' - rm -fr init && - mkdir init && - git submodule status >lines && - rm -fr init && - grep "^-$rev1" lines -' - test_failure_with_unknown_submodule () { test_must_fail git submodule $1 no-such-submodule 2>output.err && test_i18ngrep "^error: .*no-such-submodule" output.err @@ -585,6 +527,7 @@ test_expect_success 'update --init' ' test_must_fail git config submodule.example.url && git submodule update init 2> update.out && + cat update.out && test_i18ngrep "not initialized" update.out && test_must_fail git rev-parse --resolve-git-dir init/.git && @@ -602,6 +545,7 @@ test_expect_success 'update --init from subdirectory' ' ( cd sub && git submodule update ../init 2>update.out && + cat update.out && test_i18ngrep "not initialized" update.out && test_must_fail git rev-parse --resolve-git-dir ../init/.git && |