about summary refs log tree commit diff
path: root/third_party/git/t/t5411-proc-receive-hook.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/t5411-proc-receive-hook.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/t5411-proc-receive-hook.sh')
-rwxr-xr-xthird_party/git/t/t5411-proc-receive-hook.sh117
1 files changed, 0 insertions, 117 deletions
diff --git a/third_party/git/t/t5411-proc-receive-hook.sh b/third_party/git/t/t5411-proc-receive-hook.sh
deleted file mode 100755
index 746487286f5d..000000000000
--- a/third_party/git/t/t5411-proc-receive-hook.sh
+++ /dev/null
@@ -1,117 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2020 Jiang Xin
-#
-
-test_description='Test proc-receive hook'
-
-. ./test-lib.sh
-
-. "$TEST_DIRECTORY"/t5411/common-functions.sh
-
-setup_upstream_and_workbench () {
-	# Refs of upstream : master(A)
-	# Refs of workbench: master(A)  tags/v123
-	test_expect_success "setup upstream and workbench" '
-		rm -rf upstream.git &&
-		rm -rf workbench &&
-		git init --bare upstream.git &&
-		git init workbench &&
-		create_commits_in workbench A B &&
-		(
-			cd workbench &&
-			# Try to make a stable fixed width for abbreviated commit ID,
-			# this fixed-width oid will be replaced with "<OID>".
-			git config core.abbrev 7 &&
-			git tag -m "v123" v123 $A &&
-			git remote add origin ../upstream.git &&
-			git push origin master &&
-			git update-ref refs/heads/master $A $B &&
-			git -C ../upstream.git update-ref \
-				refs/heads/master $A $B
-		) &&
-		TAG=$(git -C workbench rev-parse v123) &&
-
-		# setup pre-receive hook
-		write_script upstream.git/hooks/pre-receive <<-\EOF &&
-		exec >&2
-		echo "# pre-receive hook"
-		while read old new ref
-		do
-			echo "pre-receive< $old $new $ref"
-		done
-		EOF
-
-		# setup post-receive hook
-		write_script upstream.git/hooks/post-receive <<-\EOF &&
-		exec >&2
-		echo "# post-receive hook"
-		while read old new ref
-		do
-			echo "post-receive< $old $new $ref"
-		done
-		EOF
-
-		upstream=upstream.git
-	'
-}
-
-run_proc_receive_hook_test() {
-	case $1 in
-	http)
-		PROTOCOL="HTTP protocol"
-		URL_PREFIX="http://.*"
-		;;
-	local)
-		PROTOCOL="builtin protocol"
-		URL_PREFIX="\.\."
-		;;
-	esac
-
-	# Include test cases for both file and HTTP protocol
-	for t in  "$TEST_DIRECTORY"/t5411/test-*.sh
-	do
-		. "$t"
-	done
-}
-
-# Initialize the upstream repository and local workbench.
-setup_upstream_and_workbench
-
-# Load test cases that only need to be executed once.
-for t in  "$TEST_DIRECTORY"/t5411/once-*.sh
-do
-	. "$t"
-done
-
-# Initialize the upstream repository and local workbench.
-setup_upstream_and_workbench
-
-# Run test cases for 'proc-receive' hook on local file protocol.
-run_proc_receive_hook_test local
-
-ROOT_PATH="$PWD"
-. "$TEST_DIRECTORY"/lib-gpg.sh
-. "$TEST_DIRECTORY"/lib-httpd.sh
-. "$TEST_DIRECTORY"/lib-terminal.sh
-start_httpd
-
-# Re-initialize the upstream repository and local workbench.
-setup_upstream_and_workbench
-
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-test_expect_success "setup for HTTP protocol" '
-	git -C upstream.git config http.receivepack true &&
-	upstream="$HTTPD_DOCUMENT_ROOT_PATH/upstream.git" &&
-	mv upstream.git "$upstream" &&
-	git -C workbench remote set-url origin "$HTTPD_URL/auth-push/smart/upstream.git" &&
-	set_askpass user@host pass@host
-'
-
-setup_askpass_helper
-
-# Run test cases for 'proc-receive' hook on HTTP protocol.
-run_proc_receive_hook_test http
-
-test_done