Skip to content

Commit 793731f

Browse files
bk2204gitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 586740a commit 793731f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

t/t1050-large.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ file_size () {
1212
}
1313

1414
test_expect_success setup '
15+
test_oid_init &&
1516
# clone does not allow us to pass core.bigfilethreshold to
1617
# new repos, so set core.bigfilethreshold globally
1718
git config --global core.bigfilethreshold 200k &&
@@ -177,7 +178,8 @@ test_expect_success 'git-show a large file' '
177178

178179
test_expect_success 'index-pack' '
179180
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
181183
'
182184

183185
test_expect_success 'repack' '

0 commit comments

Comments
 (0)