mirror of
https://github.com/libgit2/libgit2.git
synced 2026-01-25 02:56:17 +00:00
Merge pull request #7179 from weihanglo/sha256
fix(sha256): pass correct oid type
This commit is contained in:
@@ -817,8 +817,7 @@ int git_commit_graph_writer_add_index_file(
|
||||
if (error < 0)
|
||||
goto cleanup;
|
||||
|
||||
/* TODO: SHA256 */
|
||||
error = git_mwindow_get_pack(&p, idx_path, 0);
|
||||
error = git_mwindow_get_pack(&p, idx_path, repo->oid_type);
|
||||
if (error < 0)
|
||||
goto cleanup;
|
||||
|
||||
|
||||
@@ -579,8 +579,7 @@ int git_midx_writer_add(
|
||||
if (error < 0)
|
||||
return error;
|
||||
|
||||
/* TODO: SHA256 */
|
||||
error = git_mwindow_get_pack(&p, git_str_cstr(&idx_path_buf), 0);
|
||||
error = git_mwindow_get_pack(&p, git_str_cstr(&idx_path_buf), w->oid_type);
|
||||
git_str_dispose(&idx_path_buf);
|
||||
if (error < 0)
|
||||
return error;
|
||||
|
||||
@@ -1437,12 +1437,10 @@ int git_packbuilder_write(
|
||||
opts.progress_cb = progress_cb;
|
||||
opts.progress_cb_payload = progress_cb_payload;
|
||||
|
||||
/* TODO: SHA256 */
|
||||
|
||||
#ifdef GIT_EXPERIMENTAL_SHA256
|
||||
opts.mode = mode;
|
||||
opts.odb = pb->odb;
|
||||
opts.oid_type = GIT_OID_SHA1;
|
||||
opts.oid_type = pb->oid_type;
|
||||
|
||||
error = git_indexer_new(&indexer, path, &opts);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user