@matheusbsbs / matheus-bagliano / commits / 793731f742
Fork 0

t1050: pass algorithm to index-pack when outside repo

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>

brian m. carlson committed Jun 19, 2020 at 17:55 UTC 793731f742ab1df28deb289714e61244e3de3b37
1 file changed +3 -1
t/t1050-large.sh
+3 -1
@@ -12,6 +12,7 @@ file_size () {
12 }
13
14 test_expect_success setup '
15 + test_oid_init &&
16 # clone does not allow us to pass core.bigfilethreshold to
17 # new repos, so set core.bigfilethreshold globally
18 git config --global core.bigfilethreshold 200k &&
@@ -177,7 +178,8 @@ test_expect_success 'git-show a large file' '
178
179 test_expect_success 'index-pack' '
180 git clone file://"$(pwd)"/.git foo &&
180 - GIT_DIR=non-existent git index-pack --strict --verify foo/.git/objects/pack/*.pack
181 + GIT_DIR=non-existent git index-pack --object-format=$(test_oid algo) \
182 + --strict --verify foo/.git/objects/pack/*.pack
183 '
184
185 test_expect_success 'repack' '