about summary refs log tree commit diff
path: root/third_party/git/t/t5517-push-mirror.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/t5517-push-mirror.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/t5517-push-mirror.sh')
-rwxr-xr-xthird_party/git/t/t5517-push-mirror.sh278
1 files changed, 0 insertions, 278 deletions
diff --git a/third_party/git/t/t5517-push-mirror.sh b/third_party/git/t/t5517-push-mirror.sh
deleted file mode 100755
index e4edd56404fe..000000000000
--- a/third_party/git/t/t5517-push-mirror.sh
+++ /dev/null
@@ -1,278 +0,0 @@
-#!/bin/sh
-
-test_description='pushing to a mirror repository'
-
-. ./test-lib.sh
-
-D=$(pwd)
-
-invert () {
-	if "$@"; then
-		return 1
-	else
-		return 0
-	fi
-}
-
-mk_repo_pair () {
-	rm -rf master mirror &&
-	mkdir mirror &&
-	(
-		cd mirror &&
-		git init &&
-		git config receive.denyCurrentBranch warn
-	) &&
-	mkdir master &&
-	(
-		cd master &&
-		git init &&
-		git remote add $1 up ../mirror
-	)
-}
-
-
-# BRANCH tests
-test_expect_success 'push mirror creates new branches' '
-
-	mk_repo_pair &&
-	(
-		cd master &&
-		echo one >foo && git add foo && git commit -m one &&
-		git push --mirror up
-	) &&
-	master_master=$(cd master && git show-ref -s --verify refs/heads/master) &&
-	mirror_master=$(cd mirror && git show-ref -s --verify refs/heads/master) &&
-	test "$master_master" = "$mirror_master"
-
-'
-
-test_expect_success 'push mirror updates existing branches' '
-
-	mk_repo_pair &&
-	(
-		cd master &&
-		echo one >foo && git add foo && git commit -m one &&
-		git push --mirror up &&
-		echo two >foo && git add foo && git commit -m two &&
-		git push --mirror up
-	) &&
-	master_master=$(cd master && git show-ref -s --verify refs/heads/master) &&
-	mirror_master=$(cd mirror && git show-ref -s --verify refs/heads/master) &&
-	test "$master_master" = "$mirror_master"
-
-'
-
-test_expect_success 'push mirror force updates existing branches' '
-
-	mk_repo_pair &&
-	(
-		cd master &&
-		echo one >foo && git add foo && git commit -m one &&
-		git push --mirror up &&
-		echo two >foo && git add foo && git commit -m two &&
-		git push --mirror up &&
-		git reset --hard HEAD^ &&
-		git push --mirror up
-	) &&
-	master_master=$(cd master && git show-ref -s --verify refs/heads/master) &&
-	mirror_master=$(cd mirror && git show-ref -s --verify refs/heads/master) &&
-	test "$master_master" = "$mirror_master"
-
-'
-
-test_expect_success 'push mirror removes branches' '
-
-	mk_repo_pair &&
-	(
-		cd master &&
-		echo one >foo && git add foo && git commit -m one &&
-		git branch remove master &&
-		git push --mirror up &&
-		git branch -D remove &&
-		git push --mirror up
-	) &&
-	(
-		cd mirror &&
-		invert git show-ref -s --verify refs/heads/remove
-	)
-
-'
-
-test_expect_success 'push mirror adds, updates and removes branches together' '
-
-	mk_repo_pair &&
-	(
-		cd master &&
-		echo one >foo && git add foo && git commit -m one &&
-		git branch remove master &&
-		git push --mirror up &&
-		git branch -D remove &&
-		git branch add master &&
-		echo two >foo && git add foo && git commit -m two &&
-		git push --mirror up
-	) &&
-	master_master=$(cd master && git show-ref -s --verify refs/heads/master) &&
-	master_add=$(cd master && git show-ref -s --verify refs/heads/add) &&
-	mirror_master=$(cd mirror && git show-ref -s --verify refs/heads/master) &&
-	mirror_add=$(cd mirror && git show-ref -s --verify refs/heads/add) &&
-	test "$master_master" = "$mirror_master" &&
-	test "$master_add" = "$mirror_add" &&
-	(
-		cd mirror &&
-		invert git show-ref -s --verify refs/heads/remove
-	)
-
-'
-
-
-# TAG tests
-test_expect_success 'push mirror creates new tags' '
-
-	mk_repo_pair &&
-	(
-		cd master &&
-		echo one >foo && git add foo && git commit -m one &&
-		git tag -f tmaster master &&
-		git push --mirror up
-	) &&
-	master_master=$(cd master && git show-ref -s --verify refs/tags/tmaster) &&
-	mirror_master=$(cd mirror && git show-ref -s --verify refs/tags/tmaster) &&
-	test "$master_master" = "$mirror_master"
-
-'
-
-test_expect_success 'push mirror updates existing tags' '
-
-	mk_repo_pair &&
-	(
-		cd master &&
-		echo one >foo && git add foo && git commit -m one &&
-		git tag -f tmaster master &&
-		git push --mirror up &&
-		echo two >foo && git add foo && git commit -m two &&
-		git tag -f tmaster master &&
-		git push --mirror up
-	) &&
-	master_master=$(cd master && git show-ref -s --verify refs/tags/tmaster) &&
-	mirror_master=$(cd mirror && git show-ref -s --verify refs/tags/tmaster) &&
-	test "$master_master" = "$mirror_master"
-
-'
-
-test_expect_success 'push mirror force updates existing tags' '
-
-	mk_repo_pair &&
-	(
-		cd master &&
-		echo one >foo && git add foo && git commit -m one &&
-		git tag -f tmaster master &&
-		git push --mirror up &&
-		echo two >foo && git add foo && git commit -m two &&
-		git tag -f tmaster master &&
-		git push --mirror up &&
-		git reset --hard HEAD^ &&
-		git tag -f tmaster master &&
-		git push --mirror up
-	) &&
-	master_master=$(cd master && git show-ref -s --verify refs/tags/tmaster) &&
-	mirror_master=$(cd mirror && git show-ref -s --verify refs/tags/tmaster) &&
-	test "$master_master" = "$mirror_master"
-
-'
-
-test_expect_success 'push mirror removes tags' '
-
-	mk_repo_pair &&
-	(
-		cd master &&
-		echo one >foo && git add foo && git commit -m one &&
-		git tag -f tremove master &&
-		git push --mirror up &&
-		git tag -d tremove &&
-		git push --mirror up
-	) &&
-	(
-		cd mirror &&
-		invert git show-ref -s --verify refs/tags/tremove
-	)
-
-'
-
-test_expect_success 'push mirror adds, updates and removes tags together' '
-
-	mk_repo_pair &&
-	(
-		cd master &&
-		echo one >foo && git add foo && git commit -m one &&
-		git tag -f tmaster master &&
-		git tag -f tremove master &&
-		git push --mirror up &&
-		git tag -d tremove &&
-		git tag tadd master &&
-		echo two >foo && git add foo && git commit -m two &&
-		git tag -f tmaster master &&
-		git push --mirror up
-	) &&
-	master_master=$(cd master && git show-ref -s --verify refs/tags/tmaster) &&
-	master_add=$(cd master && git show-ref -s --verify refs/tags/tadd) &&
-	mirror_master=$(cd mirror && git show-ref -s --verify refs/tags/tmaster) &&
-	mirror_add=$(cd mirror && git show-ref -s --verify refs/tags/tadd) &&
-	test "$master_master" = "$mirror_master" &&
-	test "$master_add" = "$mirror_add" &&
-	(
-		cd mirror &&
-		invert git show-ref -s --verify refs/tags/tremove
-	)
-
-'
-
-test_expect_success 'remote.foo.mirror adds and removes branches' '
-
-	mk_repo_pair --mirror &&
-	(
-		cd master &&
-		echo one >foo && git add foo && git commit -m one &&
-		git branch keep master &&
-		git branch remove master &&
-		git push up &&
-		git branch -D remove &&
-		git push up
-	) &&
-	(
-		cd mirror &&
-		git show-ref -s --verify refs/heads/keep &&
-		invert git show-ref -s --verify refs/heads/remove
-	)
-
-'
-
-test_expect_success 'remote.foo.mirror=no has no effect' '
-
-	mk_repo_pair &&
-	(
-		cd master &&
-		echo one >foo && git add foo && git commit -m one &&
-		git config --add remote.up.mirror no &&
-		git branch keep master &&
-		git push --mirror up &&
-		git branch -D keep &&
-		git push up :
-	) &&
-	(
-		cd mirror &&
-		git show-ref -s --verify refs/heads/keep
-	)
-
-'
-
-test_expect_success 'push to mirrored repository with refspec fails' '
-	mk_repo_pair &&
-	(
-		cd master &&
-		echo one >foo && git add foo && git commit -m one &&
-		git config --add remote.up.mirror true &&
-		test_must_fail git push up master
-	)
-'
-
-test_done