about summary refs log tree commit diff
path: root/third_party/git/t/t1409-avoid-packing-refs.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/t1409-avoid-packing-refs.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/t1409-avoid-packing-refs.sh')
-rwxr-xr-xthird_party/git/t/t1409-avoid-packing-refs.sh118
1 files changed, 0 insertions, 118 deletions
diff --git a/third_party/git/t/t1409-avoid-packing-refs.sh b/third_party/git/t/t1409-avoid-packing-refs.sh
deleted file mode 100755
index be12fb63506e..000000000000
--- a/third_party/git/t/t1409-avoid-packing-refs.sh
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/sh
-
-test_description='avoid rewriting packed-refs unnecessarily'
-
-. ./test-lib.sh
-
-# Add an identifying mark to the packed-refs file header line. This
-# shouldn't upset readers, and it should be omitted if the file is
-# ever rewritten.
-mark_packed_refs () {
-	sed -e "s/^\(#.*\)/\1 t1409 /" .git/packed-refs >.git/packed-refs.new &&
-	mv .git/packed-refs.new .git/packed-refs
-}
-
-# Verify that the packed-refs file is still marked.
-check_packed_refs_marked () {
-	grep -q '^#.* t1409 ' .git/packed-refs
-}
-
-test_expect_success 'setup' '
-	git commit --allow-empty -m "Commit A" &&
-	A=$(git rev-parse HEAD) &&
-	git commit --allow-empty -m "Commit B" &&
-	B=$(git rev-parse HEAD) &&
-	git commit --allow-empty -m "Commit C" &&
-	C=$(git rev-parse HEAD)
-'
-
-test_expect_success 'do not create packed-refs file gratuitously' '
-	test_path_is_missing .git/packed-refs &&
-	git update-ref refs/heads/foo $A &&
-	test_path_is_missing .git/packed-refs &&
-	git update-ref refs/heads/foo $B &&
-	test_path_is_missing .git/packed-refs &&
-	git update-ref refs/heads/foo $C $B &&
-	test_path_is_missing .git/packed-refs &&
-	git update-ref -d refs/heads/foo &&
-	test_path_is_missing .git/packed-refs
-'
-
-test_expect_success 'check that marking the packed-refs file works' '
-	git for-each-ref >expected &&
-	git pack-refs --all &&
-	mark_packed_refs &&
-	check_packed_refs_marked &&
-	git for-each-ref >actual &&
-	test_cmp expected actual &&
-	git pack-refs --all &&
-	! check_packed_refs_marked &&
-	git for-each-ref >actual2 &&
-	test_cmp expected actual2
-'
-
-test_expect_success 'leave packed-refs untouched on update of packed' '
-	git update-ref refs/heads/packed-update $A &&
-	git pack-refs --all &&
-	mark_packed_refs &&
-	git update-ref refs/heads/packed-update $B &&
-	check_packed_refs_marked
-'
-
-test_expect_success 'leave packed-refs untouched on checked update of packed' '
-	git update-ref refs/heads/packed-checked-update $A &&
-	git pack-refs --all &&
-	mark_packed_refs &&
-	git update-ref refs/heads/packed-checked-update $B $A &&
-	check_packed_refs_marked
-'
-
-test_expect_success 'leave packed-refs untouched on verify of packed' '
-	git update-ref refs/heads/packed-verify $A &&
-	git pack-refs --all &&
-	mark_packed_refs &&
-	echo "verify refs/heads/packed-verify $A" | git update-ref --stdin &&
-	check_packed_refs_marked
-'
-
-test_expect_success 'touch packed-refs on delete of packed' '
-	git update-ref refs/heads/packed-delete $A &&
-	git pack-refs --all &&
-	mark_packed_refs &&
-	git update-ref -d refs/heads/packed-delete &&
-	! check_packed_refs_marked
-'
-
-test_expect_success 'leave packed-refs untouched on update of loose' '
-	git pack-refs --all &&
-	git update-ref refs/heads/loose-update $A &&
-	mark_packed_refs &&
-	git update-ref refs/heads/loose-update $B &&
-	check_packed_refs_marked
-'
-
-test_expect_success 'leave packed-refs untouched on checked update of loose' '
-	git pack-refs --all &&
-	git update-ref refs/heads/loose-checked-update $A &&
-	mark_packed_refs &&
-	git update-ref refs/heads/loose-checked-update $B $A &&
-	check_packed_refs_marked
-'
-
-test_expect_success 'leave packed-refs untouched on verify of loose' '
-	git pack-refs --all &&
-	git update-ref refs/heads/loose-verify $A &&
-	mark_packed_refs &&
-	echo "verify refs/heads/loose-verify $A" | git update-ref --stdin &&
-	check_packed_refs_marked
-'
-
-test_expect_success 'leave packed-refs untouched on delete of loose' '
-	git pack-refs --all &&
-	git update-ref refs/heads/loose-delete $A &&
-	mark_packed_refs &&
-	git update-ref -d refs/heads/loose-delete &&
-	check_packed_refs_marked
-'
-
-test_done