From 93ba78d6f4632ef1c5228965e3edc8c0faf88c1e Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 26 May 2020 00:06:52 +0100 Subject: revert(3p/git): Revert merge of git upstream at v2.26.2 This causes cgit to serve error pages, which is undesirable. This reverts commit 5229c9b232de5bfa959ad6ebbb4c8192ac513352, reversing changes made to f2b211131f2347342dde63975b09cf603149f1a3. --- .../git/t/t4044-diff-index-unique-abbrev.sh | 46 ++++++++-------------- 1 file changed, 16 insertions(+), 30 deletions(-) (limited to 'third_party/git/t/t4044-diff-index-unique-abbrev.sh') diff --git a/third_party/git/t/t4044-diff-index-unique-abbrev.sh b/third_party/git/t/t4044-diff-index-unique-abbrev.sh index 4701796d10e1..647905e01fb9 100755 --- a/third_party/git/t/t4044-diff-index-unique-abbrev.sh +++ b/third_party/git/t/t4044-diff-index-unique-abbrev.sh @@ -3,48 +3,34 @@ test_description='test unique sha1 abbreviation on "index from..to" line' . ./test-lib.sh -test_expect_success 'setup' ' - test_oid_cache <<-EOF && - val1 sha1:4827 - val1 sha256:5664 - - val2 sha1:11742 - val2 sha256:10625 - - hash1 sha1:51d2738463ea4ca66f8691c91e33ce64b7d41bb1 - hash1 sha256:ae31dfff0af93b2c62b0098a039b38569c43b0a7e97b873000ca42d128f27350 - - hasht1 sha1:51d27384 - hasht1 sha256:ae31dfff - - hash2 sha1:51d2738efb4ad8a1e40bed839ab8e116f0a15e47 - hash2 sha256:ae31dffada88a46fd5f53c7ed5aa25a7a8951f1d5e88456c317c8d5484d263e5 - - hasht2 sha1:51d2738e - hasht2 sha256:ae31dffa - EOF - - cat >expect_initial <<-EOF && - 100644 blob $(test_oid hash1) foo - EOF +if ! test_have_prereq SHA1 +then + skip_all='not using SHA-1 for objects' + test_done +fi + +cat >expect_initial <expect_update <<-EOF && - 100644 blob $(test_oid hash2) foo - EOF +cat >expect_update < foo && +test_expect_success 'setup' ' + echo 4827 > foo && git add foo && git commit -m "initial" && git cat-file -p HEAD: > actual && test_cmp expect_initial actual && - echo "$(test_oid val2)" > foo && + echo 11742 > foo && git commit -a -m "update" && git cat-file -p HEAD: > actual && test_cmp expect_update actual ' cat >expect <