about summary refs log tree commit diff
path: root/third_party/git/t/t5505-remote.sh
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-25T23·06+0100
committerVincent Ambo <tazjin@google.com>2020-05-25T23·06+0100
commit93ba78d6f4632ef1c5228965e3edc8c0faf88c1e (patch)
tree85730c182a9f5f492ade8e8ccdb1c2356f9900bd /third_party/git/t/t5505-remote.sh
parent6f8fbf4aa4b1654ab27d4829e114538761817de0 (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/t5505-remote.sh')
-rwxr-xr-xthird_party/git/t/t5505-remote.sh88
1 files changed, 1 insertions, 87 deletions
diff --git a/third_party/git/t/t5505-remote.sh b/third_party/git/t/t5505-remote.sh
index dda81b7d07..883b32efa0 100755
--- a/third_party/git/t/t5505-remote.sh
+++ b/third_party/git/t/t5505-remote.sh
@@ -734,53 +734,15 @@ test_expect_success 'reject adding remote with an invalid name' '
 # the last two ones check if the config is updated.
 
 test_expect_success 'rename a remote' '
-	test_config_global remote.pushDefault origin &&
 	git clone one four &&
 	(
 		cd four &&
-		git config branch.master.pushRemote origin &&
 		git remote rename origin upstream &&
 		test -z "$(git for-each-ref refs/remotes/origin)" &&
 		test "$(git symbolic-ref refs/remotes/upstream/HEAD)" = "refs/remotes/upstream/master" &&
 		test "$(git rev-parse upstream/master)" = "$(git rev-parse master)" &&
 		test "$(git config remote.upstream.fetch)" = "+refs/heads/*:refs/remotes/upstream/*" &&
-		test "$(git config branch.master.remote)" = "upstream" &&
-		test "$(git config branch.master.pushRemote)" = "upstream" &&
-		test "$(git config --global remote.pushDefault)" = "origin"
-	)
-'
-
-test_expect_success 'rename a remote renames repo remote.pushDefault' '
-	git clone one four.1 &&
-	(
-		cd four.1 &&
-		git config remote.pushDefault origin &&
-		git remote rename origin upstream &&
-		test "$(git config --local remote.pushDefault)" = "upstream"
-	)
-'
-
-test_expect_success 'rename a remote renames repo remote.pushDefault but ignores global' '
-	test_config_global remote.pushDefault other &&
-	git clone one four.2 &&
-	(
-		cd four.2 &&
-		git config remote.pushDefault origin &&
-		git remote rename origin upstream &&
-		test "$(git config --global remote.pushDefault)" = "other" &&
-		test "$(git config --local remote.pushDefault)" = "upstream"
-	)
-'
-
-test_expect_success 'rename a remote renames repo remote.pushDefault but keeps global' '
-	test_config_global remote.pushDefault origin &&
-	git clone one four.3 &&
-	(
-		cd four.3 &&
-		git config remote.pushDefault origin &&
-		git remote rename origin upstream &&
-		test "$(git config --global remote.pushDefault)" = "origin" &&
-		test "$(git config --local remote.pushDefault)" = "upstream"
+		test "$(git config branch.master.remote)" = "upstream"
 	)
 '
 
@@ -822,54 +784,6 @@ test_expect_success 'rename succeeds with existing remote.<target>.prune' '
 	git -C four.four remote rename origin upstream
 '
 
-test_expect_success 'remove a remote' '
-	test_config_global remote.pushDefault origin &&
-	git clone one four.five &&
-	(
-		cd four.five &&
-		git config branch.master.pushRemote origin &&
-		git remote remove origin &&
-		test -z "$(git for-each-ref refs/remotes/origin)" &&
-		test_must_fail git config branch.master.remote &&
-		test_must_fail git config branch.master.pushRemote &&
-		test "$(git config --global remote.pushDefault)" = "origin"
-	)
-'
-
-test_expect_success 'remove a remote removes repo remote.pushDefault' '
-	git clone one four.five.1 &&
-	(
-		cd four.five.1 &&
-		git config remote.pushDefault origin &&
-		git remote remove origin &&
-		test_must_fail git config --local remote.pushDefault
-	)
-'
-
-test_expect_success 'remove a remote removes repo remote.pushDefault but ignores global' '
-	test_config_global remote.pushDefault other &&
-	git clone one four.five.2 &&
-	(
-		cd four.five.2 &&
-		git config remote.pushDefault origin &&
-		git remote remove origin &&
-		test "$(git config --global remote.pushDefault)" = "other" &&
-		test_must_fail git config --local remote.pushDefault
-	)
-'
-
-test_expect_success 'remove a remote removes repo remote.pushDefault but keeps global' '
-	test_config_global remote.pushDefault origin &&
-	git clone one four.five.3 &&
-	(
-		cd four.five.3 &&
-		git config remote.pushDefault origin &&
-		git remote remove origin &&
-		test "$(git config --global remote.pushDefault)" = "origin" &&
-		test_must_fail git config --local remote.pushDefault
-	)
-'
-
 cat >remotes_origin <<EOF
 URL: $(pwd)/one
 Push: refs/heads/master:refs/heads/upstream