about summary refs log tree commit diff
path: root/third_party/git/t/t5615-alternate-env.sh
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-09-21T10·03+0300
committerVincent Ambo <mail@tazj.in>2021-09-21T11·29+0300
commit43b1791ec601732ac31195df96781a848360a9ac (patch)
treedaae8d638343295d2f1f7da955e556ef4c958864 /third_party/git/t/t5615-alternate-env.sh
parent2d8e7dc9d9c38127ec4ebd13aee8e8f586a43318 (diff)
chore(3p/git): Unvendor git and track patches instead r/2903
This was vendored a long time ago under the expectation that keeping
it in sync with cgit would be easier this way, but it has proven not
to be a big issue.

On the other hand, a vendored copy of git is an annoying maintenance
burden. It is much easier to rebase the single (dottime) patch that we
have.

This removes the vendored copy of git and instead passes the git
source code to cgit via `pkgs.srcOnly`, which includes the applied
patch so that cgit can continue rendering dottime.

Change-Id: If31f62dea7ce688fd1b9050204e9378019775f2b
Diffstat (limited to 'third_party/git/t/t5615-alternate-env.sh')
-rwxr-xr-xthird_party/git/t/t5615-alternate-env.sh90
1 files changed, 0 insertions, 90 deletions
diff --git a/third_party/git/t/t5615-alternate-env.sh b/third_party/git/t/t5615-alternate-env.sh
deleted file mode 100755
index b4905b822c07..000000000000
--- a/third_party/git/t/t5615-alternate-env.sh
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/bin/sh
-
-test_description='handling of alternates in environment variables'
-. ./test-lib.sh
-
-check_obj () {
-	alt=$1; shift
-	while read obj expect
-	do
-		echo "$obj" >&5 &&
-		echo "$obj $expect" >&6
-	done 5>input 6>expect &&
-	GIT_ALTERNATE_OBJECT_DIRECTORIES=$alt \
-		git "$@" cat-file --batch-check='%(objectname) %(objecttype)' \
-		<input >actual &&
-	test_cmp expect actual
-}
-
-test_expect_success 'create alternate repositories' '
-	git init --bare one.git &&
-	one=$(echo one | git -C one.git hash-object -w --stdin) &&
-	git init --bare two.git &&
-	two=$(echo two | git -C two.git hash-object -w --stdin)
-'
-
-test_expect_success 'objects inaccessible without alternates' '
-	check_obj "" <<-EOF
-	$one missing
-	$two missing
-	EOF
-'
-
-test_expect_success 'access alternate via absolute path' '
-	check_obj "$PWD/one.git/objects" <<-EOF
-	$one blob
-	$two missing
-	EOF
-'
-
-test_expect_success 'access multiple alternates' '
-	check_obj "$PWD/one.git/objects:$PWD/two.git/objects" <<-EOF
-	$one blob
-	$two blob
-	EOF
-'
-
-# bare paths are relative from $GIT_DIR
-test_expect_success 'access alternate via relative path (bare)' '
-	git init --bare bare.git &&
-	check_obj "../one.git/objects" -C bare.git <<-EOF
-	$one blob
-	EOF
-'
-
-# non-bare paths are relative to top of worktree
-test_expect_success 'access alternate via relative path (worktree)' '
-	git init worktree &&
-	check_obj "../one.git/objects" -C worktree <<-EOF
-	$one blob
-	EOF
-'
-
-# path is computed after moving to top-level of worktree
-test_expect_success 'access alternate via relative path (subdir)' '
-	mkdir subdir &&
-	check_obj "one.git/objects" -C subdir <<-EOF
-	$one blob
-	EOF
-'
-
-# set variables outside test to avoid quote insanity; the \057 is '/',
-# which doesn't need quoting, but just confirms that de-quoting
-# is working.
-quoted='"one.git\057objects"'
-unquoted='two.git/objects'
-test_expect_success 'mix of quoted and unquoted alternates' '
-	check_obj "$quoted:$unquoted" <<-EOF
-	$one blob
-	$two blob
-	EOF
-'
-
-test_expect_success !MINGW 'broken quoting falls back to interpreting raw' '
-	mv one.git \"one.git &&
-	check_obj \"one.git/objects <<-EOF
-	$one blob
-	EOF
-'
-
-test_done