Merge pull request #7179 from weihanglo/sha256

fix(sha256): pass correct oid type
This commit is contained in:
Edward Thomson
2026-01-08 14:33:25 +00:00
committed by GitHub
3 changed files with 3 additions and 7 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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