about summary refs log tree commit diff
path: root/third_party/git/t/t5519-push-alternates.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/t5519-push-alternates.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/t5519-push-alternates.sh')
-rwxr-xr-xthird_party/git/t/t5519-push-alternates.sh143
1 files changed, 0 insertions, 143 deletions
diff --git a/third_party/git/t/t5519-push-alternates.sh b/third_party/git/t/t5519-push-alternates.sh
deleted file mode 100755
index 11fcd37700f3..000000000000
--- a/third_party/git/t/t5519-push-alternates.sh
+++ /dev/null
@@ -1,143 +0,0 @@
-#!/bin/sh
-
-test_description='push to a repository that borrows from elsewhere'
-
-. ./test-lib.sh
-
-test_expect_success setup '
-	mkdir alice-pub &&
-	(
-		cd alice-pub &&
-		GIT_DIR=. git init
-	) &&
-	mkdir alice-work &&
-	(
-		cd alice-work &&
-		git init &&
-		>file &&
-		git add . &&
-		git commit -m initial &&
-		git push ../alice-pub master
-	) &&
-
-	# Project Bob is a fork of project Alice
-	mkdir bob-pub &&
-	(
-		cd bob-pub &&
-		GIT_DIR=. git init &&
-		mkdir -p objects/info &&
-		echo ../../alice-pub/objects >objects/info/alternates
-	) &&
-	git clone alice-pub bob-work &&
-	(
-		cd bob-work &&
-		git push ../bob-pub master
-	)
-'
-
-test_expect_success 'alice works and pushes' '
-	(
-		cd alice-work &&
-		echo more >file &&
-		git commit -a -m second &&
-		git push ../alice-pub :
-	)
-'
-
-test_expect_success 'bob fetches from alice, works and pushes' '
-	(
-		# Bob acquires what Alice did in his work tree first.
-		# Even though these objects are not directly in
-		# the public repository of Bob, this push does not
-		# need to send the commit Bob received from Alice
-		# to his public repository, as all the object Alice
-		# has at her public repository are available to it
-		# via its alternates.
-		cd bob-work &&
-		git pull ../alice-pub master &&
-		echo more bob >file &&
-		git commit -a -m third &&
-		git push ../bob-pub :
-	) &&
-
-	# Check that the second commit by Alice is not sent
-	# to ../bob-pub
-	(
-		cd bob-pub &&
-		second=$(git rev-parse HEAD^) &&
-		rm -f objects/info/alternates &&
-		test_must_fail git cat-file -t $second &&
-		echo ../../alice-pub/objects >objects/info/alternates
-	)
-'
-
-test_expect_success 'clean-up in case the previous failed' '
-	(
-		cd bob-pub &&
-		echo ../../alice-pub/objects >objects/info/alternates
-	)
-'
-
-test_expect_success 'alice works and pushes again' '
-	(
-		# Alice does not care what Bob does.  She does not
-		# even have to be aware of his existence.  She just
-		# keeps working and pushing
-		cd alice-work &&
-		echo more alice >file &&
-		git commit -a -m fourth &&
-		git push ../alice-pub :
-	)
-'
-
-test_expect_success 'bob works and pushes' '
-	(
-		# This time Bob does not pull from Alice, and
-		# the master branch at her public repository points
-		# at a commit Bob does not know about.  This should
-		# not prevent the push by Bob from succeeding.
-		cd bob-work &&
-		echo yet more bob >file &&
-		git commit -a -m fifth &&
-		git push ../bob-pub :
-	)
-'
-
-test_expect_success 'alice works and pushes yet again' '
-	(
-		# Alice does not care what Bob does.  She does not
-		# even have to be aware of his existence.  She just
-		# keeps working and pushing
-		cd alice-work &&
-		echo more and more alice >file &&
-		git commit -a -m sixth.1 &&
-		echo more and more alice >>file &&
-		git commit -a -m sixth.2 &&
-		echo more and more alice >>file &&
-		git commit -a -m sixth.3 &&
-		git push ../alice-pub :
-	)
-'
-
-test_expect_success 'bob works and pushes again' '
-	(
-		cd alice-pub &&
-		git cat-file commit master >../bob-work/commit
-	) &&
-	(
-		# This time Bob does not pull from Alice, and
-		# the master branch at her public repository points
-		# at a commit Bob does not fully know about, but
-		# he happens to have the commit object (but not the
-		# necessary tree) in his repository from Alice.
-		# This should not prevent the push by Bob from
-		# succeeding.
-		cd bob-work &&
-		git hash-object -t commit -w commit &&
-		echo even more bob >file &&
-		git commit -a -m seventh &&
-		git push ../bob-pub :
-	)
-'
-
-test_done