about summary refs log tree commit diff
path: root/third_party/git/t/t5313-pack-bounds-checks.sh
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-25T23·06+0100
committerVincent Ambo <tazjin@google.com>2020-05-25T23·06+0100
commit93ba78d6f4632ef1c5228965e3edc8c0faf88c1e (patch)
tree85730c182a9f5f492ade8e8ccdb1c2356f9900bd /third_party/git/t/t5313-pack-bounds-checks.sh
parent6f8fbf4aa4b1654ab27d4829e114538761817de0 (diff)
revert(3p/git): Revert merge of git upstream at v2.26.2 r/852
This causes cgit to serve error pages, which is undesirable.

This reverts commit 5229c9b232de5bfa959ad6ebbb4c8192ac513352, reversing
changes made to f2b211131f2347342dde63975b09cf603149f1a3.
Diffstat (limited to 'third_party/git/t/t5313-pack-bounds-checks.sh')
-rwxr-xr-xthird_party/git/t/t5313-pack-bounds-checks.sh19
1 files changed, 4 insertions, 15 deletions
diff --git a/third_party/git/t/t5313-pack-bounds-checks.sh b/third_party/git/t/t5313-pack-bounds-checks.sh
index 2a4557efc2d6..f1708d415e55 100755
--- a/third_party/git/t/t5313-pack-bounds-checks.sh
+++ b/third_party/git/t/t5313-pack-bounds-checks.sh
@@ -38,27 +38,16 @@ munge () {
 # for the initial, and another ofs(4*nr) past that for the extended.
 #
 ofs_table () {
-	echo $((4 + 4 + 4*256 + $(test_oid rawsz)*$1 + 4*$1))
+	echo $((4 + 4 + 4*256 + 20*$1 + 4*$1))
 }
 extended_table () {
 	echo $(($(ofs_table "$1") + 4*$1))
 }
 
-test_expect_success 'setup' '
-	test_oid_init &&
-	test_oid_cache <<-EOF
-	oid000 sha1:1485
-	oid000 sha256:4222
-
-	oidfff sha1:74
-	oidfff sha256:1350
-	EOF
-'
-
 test_expect_success 'set up base packfile and variables' '
 	# the hash of this content starts with ff, which
 	# makes some later computations much simpler
-	echo $(test_oid oidfff) >file &&
+	echo 74 >file &&
 	git add file &&
 	git commit -m base &&
 	git repack -ad &&
@@ -151,10 +140,10 @@ test_expect_success 'bogus offset inside v2 extended table' '
 	# an extended table (if the first object were larger than 2^31).
 	#
 	# Note that the value is important here. We want $object as
-	# the second entry in sorted-hash order. The hash of this object starts
+	# the second entry in sorted-sha1 order. The sha1 of 1485 starts
 	# with "000", which sorts before that of $object (which starts
 	# with "fff").
-	second=$(test_oid oid000 | git hash-object -w --stdin) &&
+	second=$(echo 1485 | git hash-object -w --stdin) &&
 	do_pack "$object $second" --index-version=2 &&
 
 	# We have to make extra room for the table, so we cannot