commit - 415ccd808c9fdddaa665206aff3628070070a7e8
commit + 92a090c68f0df4e43c9fd81f0a5e8df81b594b2b
blob - fa94d175e717cff80203dddea664810eba1e9ee5
blob + 40eb28c29c7042a0646e6597df2942339b5ebd48
--- lib/object.c
+++ lib/object.c
{
struct got_object_id id;
- if (!got_parse_object_id(&id, id_str, GOT_HASH_SHA1))
+ if (!got_parse_object_id(&id, id_str, repo->algo))
return got_error_path(id_str, GOT_ERR_BAD_OBJ_ID_STR);
return got_object_open(obj, repo, &id);
blob - 2859f8d7a34b7bfa1cd69245c171bbc2b93a425b
blob + 4afb73ee23fb9c7a71b841ff617b0d817f7de341
--- lib/patch.c
+++ lib/patch.c
return err;
idptr = matched_id;
} else {
- if (!got_parse_object_id(&id, blobid, GOT_HASH_SHA1))
+ if (!got_parse_object_id(&id, blobid,
+ got_repo_get_object_format(repo)))
return got_error(GOT_ERR_BAD_OBJ_ID_STR);
idptr = &id;
}