about summary refs log tree commit diff
path: root/third_party/git/t/t2400-worktree-add.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/t2400-worktree-add.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/t2400-worktree-add.sh')
-rwxr-xr-xthird_party/git/t/t2400-worktree-add.sh37
1 files changed, 2 insertions, 35 deletions
diff --git a/third_party/git/t/t2400-worktree-add.sh b/third_party/git/t/t2400-worktree-add.sh
index 5a7495474aa8..e819ba741ec9 100755
--- a/third_party/git/t/t2400-worktree-add.sh
+++ b/third_party/git/t/t2400-worktree-add.sh
@@ -438,7 +438,7 @@ test_expect_success 'git worktree add does not match remote' '
 		cd foo &&
 		test_must_fail git config "branch.foo.remote" &&
 		test_must_fail git config "branch.foo.merge" &&
-		test_cmp_rev ! refs/remotes/repo_a/foo refs/heads/foo
+		! test_cmp_rev refs/remotes/repo_a/foo refs/heads/foo
 	)
 '
 
@@ -483,7 +483,7 @@ test_expect_success 'git worktree --no-guess-remote option overrides config' '
 		cd foo &&
 		test_must_fail git config "branch.foo.remote" &&
 		test_must_fail git config "branch.foo.merge" &&
-		test_cmp_rev ! refs/remotes/repo_a/foo refs/heads/foo
+		! test_cmp_rev refs/remotes/repo_a/foo refs/heads/foo
 	)
 '
 
@@ -570,15 +570,6 @@ test_expect_success '"add" an existing locked but missing worktree' '
 	git worktree add --force --force --detach gnoo
 '
 
-test_expect_success '"add" not tripped up by magic worktree matching"' '
-	# if worktree "sub1/bar" exists, "git worktree add bar" in distinct
-	# directory `sub2` should not mistakenly complain that `bar` is an
-	# already-registered worktree
-	mkdir sub1 sub2 &&
-	git -C sub1 --git-dir=../.git worktree add --detach bozo &&
-	git -C sub2 --git-dir=../.git worktree add --detach bozo
-'
-
 test_expect_success FUNNYNAMES 'sanitize generated worktree name' '
 	git worktree add --detach ".  weird*..?.lock.lock" &&
 	test -d .git/worktrees/---weird-.-
@@ -596,28 +587,4 @@ test_expect_success '"add" should not fail because of another bad worktree' '
 	)
 '
 
-test_expect_success '"add" with uninitialized submodule, with submodule.recurse unset' '
-	test_create_repo submodule &&
-	test_commit -C submodule first &&
-	test_create_repo project &&
-	git -C project submodule add ../submodule &&
-	git -C project add submodule &&
-	test_tick &&
-	git -C project commit -m add_sub &&
-	git clone project project-clone &&
-	git -C project-clone worktree add ../project-2
-'
-test_expect_success '"add" with uninitialized submodule, with submodule.recurse set' '
-	git -C project-clone -c submodule.recurse worktree add ../project-3
-'
-
-test_expect_success '"add" with initialized submodule, with submodule.recurse unset' '
-	git -C project-clone submodule update --init &&
-	git -C project-clone worktree add ../project-4
-'
-
-test_expect_success '"add" with initialized submodule, with submodule.recurse set' '
-	git -C project-clone -c submodule.recurse worktree add ../project-5
-'
-
 test_done