Commit 46365f68 by Edward Thomson

odb_pack: handle sha256 short lookups

parent c0178ef3
...@@ -309,11 +309,17 @@ static int pack_entry_find_prefix( ...@@ -309,11 +309,17 @@ static int pack_entry_find_prefix(
{ {
int error; int error;
size_t i; size_t i;
git_oid found_full_oid = GIT_OID_SHA1_ZERO; git_oid found_full_oid;
bool found = false; bool found = false;
struct git_pack_file *last_found = backend->last_found, *p; struct git_pack_file *last_found = backend->last_found, *p;
git_midx_entry midx_entry; git_midx_entry midx_entry;
#ifdef GIT_EXPERIMENTAL_SHA256
git_oid_clear(&found_full_oid, short_oid->type);
#else
git_oid_clear(&found_full_oid, GIT_OID_SHA1);
#endif
if (backend->midx) { if (backend->midx) {
error = git_midx_entry_find(&midx_entry, backend->midx, short_oid, len); error = git_midx_entry_find(&midx_entry, backend->midx, short_oid, len);
if (error == GIT_EAMBIGUOUS) if (error == GIT_EAMBIGUOUS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment