Skip to content

Commit fa9e009

Browse files
pks-tgitster
authored andcommitted
t/helper: use correct object hash in partial-clone helper
The `object_info()` function of the partial-clone helper is responsible for checking the object ID of a repository other than `the_repository`. We use `parse_oid_hex()` in this function though, which means that we still depend on `the_repository->hash_algo`. Fix this by using the object hash of the function-local repository. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2a0e114 commit fa9e009

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/helper/test-partial-clone.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ static void object_info(const char *gitdir, const char *oid_hex)
2121

2222
if (repo_init(&r, gitdir, NULL))
2323
die("could not init repo");
24-
if (parse_oid_hex(oid_hex, &oid, &p))
24+
if (parse_oid_hex_algop(oid_hex, &oid, &p, r.hash_algo))
2525
die("could not parse oid");
2626
if (oid_object_info_extended(&r, &oid, &oi, 0))
2727
die("could not obtain object info");

0 commit comments

Comments
 (0)