]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t1050: pass algorithm to index-pack when outside repo
authorbrian m. carlson <sandals@crustytoothpaste.net>
Fri, 19 Jun 2020 17:55:53 +0000 (17:55 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 19 Jun 2020 21:04:08 +0000 (14:04 -0700)
When outside a repository, git index-pack is unable to guess the hash
algorithm in use for a pack, since packs don't contain any information
on the algorithm in use. Pass an option to index-pack to help it out in
this test.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1050-large.sh

index 7f88ea07c27819bdabffcda4470f243c0343cd90..6a56d1ca246f3437ab7f8dfd77d9eef9fe4b4144 100755 (executable)
@@ -12,6 +12,7 @@ file_size () {
 }
 
 test_expect_success setup '
+       test_oid_init &&
        # clone does not allow us to pass core.bigfilethreshold to
        # new repos, so set core.bigfilethreshold globally
        git config --global core.bigfilethreshold 200k &&
@@ -177,7 +178,8 @@ test_expect_success 'git-show a large file' '
 
 test_expect_success 'index-pack' '
        git clone file://"$(pwd)"/.git foo &&
-       GIT_DIR=non-existent git index-pack --strict --verify foo/.git/objects/pack/*.pack
+       GIT_DIR=non-existent git index-pack --object-format=$(test_oid algo) \
+               --strict --verify foo/.git/objects/pack/*.pack
 '
 
 test_expect_success 'repack' '