about summary refs log tree commit diff
path: root/third_party/git/t/interop/interop-lib.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/interop/interop-lib.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/interop/interop-lib.sh')
-rw-r--r--third_party/git/t/interop/interop-lib.sh92
1 files changed, 0 insertions, 92 deletions
diff --git a/third_party/git/t/interop/interop-lib.sh b/third_party/git/t/interop/interop-lib.sh
deleted file mode 100644
index 3e0a2911d4f9..000000000000
--- a/third_party/git/t/interop/interop-lib.sh
+++ /dev/null
@@ -1,92 +0,0 @@
-# Interoperability testing framework. Each script should source
-# this after setting default $VERSION_A and $VERSION_B variables.
-
-. ../../GIT-BUILD-OPTIONS
-INTEROP_ROOT=$(pwd)
-BUILD_ROOT=$INTEROP_ROOT/build
-
-build_version () {
-	if test -z "$1"
-	then
-		echo >&2 "error: test script did not set default versions"
-		return 1
-	fi
-
-	if test "$1" = "."
-	then
-		git rev-parse --show-toplevel
-		return 0
-	fi
-
-	sha1=$(git rev-parse "$1^{tree}") || return 1
-	dir=$BUILD_ROOT/$sha1
-
-	if test -e "$dir/.built"
-	then
-		echo "$dir"
-		return 0
-	fi
-
-	echo >&2 "==> Building $1..."
-
-	mkdir -p "$dir" || return 1
-
-	(cd "$(git rev-parse --show-cdup)" && git archive --format=tar "$sha1") |
-	(cd "$dir" && tar x) ||
-	return 1
-
-	for config in config.mak config.mak.autogen config.status
-	do
-		if test -e "$INTEROP_ROOT/../../$config"
-		then
-			cp "$INTEROP_ROOT/../../$config" "$dir/" || return 1
-		fi
-	done
-
-	(
-		cd "$dir" &&
-		make $GIT_INTEROP_MAKE_OPTS >&2 &&
-		touch .built
-	) || return 1
-
-	echo "$dir"
-}
-
-# Old versions of git don't have bin-wrappers, so let's give a rough emulation.
-wrap_git () {
-	write_script "$1" <<-EOF
-	GIT_EXEC_PATH="$2"
-	export GIT_EXEC_PATH
-	PATH="$2:\$PATH"
-	export GIT_EXEC_PATH
-	exec git "\$@"
-	EOF
-}
-
-generate_wrappers () {
-	mkdir -p .bin &&
-	wrap_git .bin/git.a "$DIR_A" &&
-	wrap_git .bin/git.b "$DIR_B" &&
-	write_script .bin/git <<-\EOF &&
-	echo >&2 fatal: test tried to run generic git
-	exit 1
-	EOF
-	PATH=$(pwd)/.bin:$PATH
-}
-
-VERSION_A=${GIT_TEST_VERSION_A:-$VERSION_A}
-VERSION_B=${GIT_TEST_VERSION_B:-$VERSION_B}
-
-if ! DIR_A=$(build_version "$VERSION_A") ||
-   ! DIR_B=$(build_version "$VERSION_B")
-then
-	echo >&2 "fatal: unable to build git versions"
-	exit 1
-fi
-
-TEST_DIRECTORY=$INTEROP_ROOT/..
-TEST_OUTPUT_DIRECTORY=$INTEROP_ROOT
-TEST_NO_CREATE_REPO=t
-. "$TEST_DIRECTORY"/test-lib.sh
-
-generate_wrappers || die "unable to set up interop test environment"