diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2022-07-11 14:11:15 -0400 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2022-07-11 21:36:49 -0400 |
commit | 5e44529d206936336e568725aec4fb5fe64138b7 (patch) | |
tree | a4ca6d441371d7b146bae5d123100633900de3a7 /src/libgit2/midx.c | |
parent | 73deea7e0cef7761588df25c396c156ae901725a (diff) | |
download | libgit2-ethomson/sha256_pack.tar.gz |
pack: support SHA256 in packfilesethomson/sha256_pack
Diffstat (limited to 'src/libgit2/midx.c')
-rw-r--r-- | src/libgit2/midx.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libgit2/midx.c b/src/libgit2/midx.c index 37de58ccd..1a0bdd252 100644 --- a/src/libgit2/midx.c +++ b/src/libgit2/midx.c @@ -392,7 +392,7 @@ int git_midx_entry_find( hi = ntohl(idx->oid_fanout[(int)short_oid->id[0]]); lo = ((short_oid->id[0] == 0x0) ? 0 : ntohl(idx->oid_fanout[(int)short_oid->id[0] - 1])); - pos = git_pack__lookup_id(idx->oid_lookup, GIT_OID_SHA1_SIZE, lo, hi, short_oid->id); + pos = git_pack__lookup_id(idx->oid_lookup, GIT_OID_SHA1_SIZE, lo, hi, short_oid->id, GIT_OID_SHA1); if (pos >= 0) { /* An object matching exactly the oid was found */ @@ -549,7 +549,8 @@ int git_midx_writer_add( if (error < 0) return error; - error = git_mwindow_get_pack(&p, git_str_cstr(&idx_path_buf)); + /* TODO: SHA256 */ + error = git_mwindow_get_pack(&p, git_str_cstr(&idx_path_buf), 0); git_str_dispose(&idx_path_buf); if (error < 0) return error; |