about summary refs log tree commit diff
path: root/third_party/git/t/t5571-pre-push-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/t5571-pre-push-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/t5571-pre-push-hook.sh')
-rwxr-xr-xthird_party/git/t/t5571-pre-push-hook.sh128
1 files changed, 0 insertions, 128 deletions
diff --git a/third_party/git/t/t5571-pre-push-hook.sh b/third_party/git/t/t5571-pre-push-hook.sh
deleted file mode 100755
index ac53d638695b..000000000000
--- a/third_party/git/t/t5571-pre-push-hook.sh
+++ /dev/null
@@ -1,128 +0,0 @@
-#!/bin/sh
-
-test_description='check pre-push hooks'
-. ./test-lib.sh
-
-# Setup hook that always succeeds
-HOOKDIR="$(git rev-parse --git-dir)/hooks"
-HOOK="$HOOKDIR/pre-push"
-mkdir -p "$HOOKDIR"
-write_script "$HOOK" <<EOF
-cat >/dev/null
-exit 0
-EOF
-
-test_expect_success 'setup' '
-	git config push.default upstream &&
-	git init --bare repo1 &&
-	git remote add parent1 repo1 &&
-	test_commit one &&
-	git push parent1 HEAD:foreign
-'
-write_script "$HOOK" <<EOF
-cat >/dev/null
-exit 1
-EOF
-
-COMMIT1="$(git rev-parse HEAD)"
-export COMMIT1
-
-test_expect_success 'push with failing hook' '
-	test_commit two &&
-	test_must_fail git push parent1 HEAD
-'
-
-test_expect_success '--no-verify bypasses hook' '
-	git push --no-verify parent1 HEAD
-'
-
-COMMIT2="$(git rev-parse HEAD)"
-export COMMIT2
-
-write_script "$HOOK" <<'EOF'
-echo "$1" >actual
-echo "$2" >>actual
-cat >>actual
-EOF
-
-cat >expected <<EOF
-parent1
-repo1
-refs/heads/master $COMMIT2 refs/heads/foreign $COMMIT1
-EOF
-
-test_expect_success 'push with hook' '
-	git push parent1 master:foreign &&
-	diff expected actual
-'
-
-test_expect_success 'add a branch' '
-	git checkout -b other parent1/foreign &&
-	test_commit three
-'
-
-COMMIT3="$(git rev-parse HEAD)"
-export COMMIT3
-
-cat >expected <<EOF
-parent1
-repo1
-refs/heads/other $COMMIT3 refs/heads/foreign $COMMIT2
-EOF
-
-test_expect_success 'push to default' '
-	git push &&
-	diff expected actual
-'
-
-cat >expected <<EOF
-parent1
-repo1
-refs/tags/one $COMMIT1 refs/tags/tag1 $ZERO_OID
-HEAD~ $COMMIT2 refs/heads/prev $ZERO_OID
-EOF
-
-test_expect_success 'push non-branches' '
-	git push parent1 one:tag1 HEAD~:refs/heads/prev &&
-	diff expected actual
-'
-
-cat >expected <<EOF
-parent1
-repo1
-(delete) $ZERO_OID refs/heads/prev $COMMIT2
-EOF
-
-test_expect_success 'push delete' '
-	git push parent1 :prev &&
-	diff expected actual
-'
-
-cat >expected <<EOF
-repo1
-repo1
-HEAD $COMMIT3 refs/heads/other $ZERO_OID
-EOF
-
-test_expect_success 'push to URL' '
-	git push repo1 HEAD &&
-	diff expected actual
-'
-
-test_expect_success 'set up many-ref tests' '
-	{
-		nr=1000
-		while test $nr -lt 2000
-		do
-			nr=$(( $nr + 1 ))
-			echo "create refs/heads/b/$nr $COMMIT3"
-		done
-	} | git update-ref --stdin
-'
-
-test_expect_success 'sigpipe does not cause pre-push hook failure' '
-	echo "exit 0" | write_script "$HOOK" &&
-	git push parent1 "refs/heads/b/*:refs/heads/b/*"
-'
-
-test_done