about summary refs log tree commit diff
path: root/third_party/git/t/t5530-upload-pack-error.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/t5530-upload-pack-error.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/t5530-upload-pack-error.sh')
-rwxr-xr-xthird_party/git/t/t5530-upload-pack-error.sh105
1 files changed, 0 insertions, 105 deletions
diff --git a/third_party/git/t/t5530-upload-pack-error.sh b/third_party/git/t/t5530-upload-pack-error.sh
deleted file mode 100755
index 205a2631e7f8..000000000000
--- a/third_party/git/t/t5530-upload-pack-error.sh
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/bin/sh
-
-test_description='errors in upload-pack'
-
-. ./test-lib.sh
-
-D=$(pwd)
-
-corrupt_repo () {
-	object_sha1=$(git rev-parse "$1") &&
-	ob=$(expr "$object_sha1" : "\(..\)") &&
-	ject=$(expr "$object_sha1" : "..\(..*\)") &&
-	rm -f ".git/objects/$ob/$ject"
-}
-
-test_expect_success 'setup and corrupt repository' '
-	echo file >file &&
-	git add file &&
-	git rev-parse :file &&
-	git commit -a -m original &&
-	test_tick &&
-	echo changed >file &&
-	git commit -a -m changed &&
-	corrupt_repo HEAD:file
-
-'
-
-test_expect_success 'fsck fails' '
-	test_must_fail git fsck
-'
-
-test_expect_success 'upload-pack fails due to error in pack-objects packing' '
-	head=$(git rev-parse HEAD) &&
-	hexsz=$(test_oid hexsz) &&
-	printf "%04xwant %s\n00000009done\n0000" \
-		$(($hexsz + 10)) $head >input &&
-	test_must_fail git upload-pack . <input >/dev/null 2>output.err &&
-	test_i18ngrep "unable to read" output.err &&
-	test_i18ngrep "pack-objects died" output.err
-'
-
-test_expect_success 'corrupt repo differently' '
-
-	git hash-object -w file &&
-	corrupt_repo HEAD^^{tree}
-
-'
-
-test_expect_success 'fsck fails' '
-	test_must_fail git fsck
-'
-test_expect_success 'upload-pack fails due to error in rev-list' '
-
-	printf "%04xwant %s\n%04xshallow %s00000009done\n0000" \
-		$(($hexsz + 10)) $(git rev-parse HEAD) \
-		$(($hexsz + 12)) $(git rev-parse HEAD^) >input &&
-	test_must_fail git upload-pack . <input >/dev/null 2>output.err &&
-	grep "bad tree object" output.err
-'
-
-test_expect_success 'upload-pack fails due to bad want (no object)' '
-
-	printf "%04xwant %s multi_ack_detailed\n00000009done\n0000" \
-		$(($hexsz + 29)) $(test_oid deadbeef) >input &&
-	test_must_fail git upload-pack . <input >output 2>output.err &&
-	grep "not our ref" output.err &&
-	grep "ERR" output &&
-	! grep multi_ack_detailed output.err
-'
-
-test_expect_success 'upload-pack fails due to bad want (not tip)' '
-
-	oid=$(echo an object we have | git hash-object -w --stdin) &&
-	printf "%04xwant %s multi_ack_detailed\n00000009done\n0000" \
-		$(($hexsz + 29)) "$oid" >input &&
-	test_must_fail git upload-pack . <input >output 2>output.err &&
-	grep "not our ref" output.err &&
-	grep "ERR" output &&
-	! grep multi_ack_detailed output.err
-'
-
-test_expect_success 'upload-pack fails due to error in pack-objects enumeration' '
-
-	printf "%04xwant %s\n00000009done\n0000" \
-		$((hexsz + 10)) $(git rev-parse HEAD) >input &&
-	test_must_fail git upload-pack . <input >/dev/null 2>output.err &&
-	grep "bad tree object" output.err &&
-	grep "pack-objects died" output.err
-'
-
-test_expect_success 'create empty repository' '
-
-	mkdir foo &&
-	cd foo &&
-	git init
-
-'
-
-test_expect_success 'fetch fails' '
-
-	test_must_fail git fetch .. master
-
-'
-
-test_done