diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2021-09-29 21:31:17 -0400 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2021-10-01 08:12:07 -0400 |
commit | 2a713da1ec2e9f74c9edc75b06540ab095c68c34 (patch) | |
tree | 488891e9b76cf54582738c48674e7dfde81cc638 /src/commit_graph.c | |
parent | 3fff59705fec852b97639364ca7b3e84ff7040b7 (diff) | |
download | libgit2-2a713da1ec2e9f74c9edc75b06540ab095c68c34.tar.gz |
hash: accept the algorithm in inputs
Diffstat (limited to 'src/commit_graph.c')
-rw-r--r-- | src/commit_graph.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commit_graph.c b/src/commit_graph.c index f663fc5d3..8bb2397d7 100644 --- a/src/commit_graph.c +++ b/src/commit_graph.c @@ -230,7 +230,7 @@ int git_commit_graph_file_parse( return commit_graph_error("wrong commit-graph size"); git_oid_cpy(&file->checksum, (git_oid *)(data + trailer_offset)); - if (git_hash_buf(&cgraph_checksum, data, (size_t)trailer_offset) < 0) + if (git_hash_buf(&cgraph_checksum, data, (size_t)trailer_offset, GIT_HASH_ALGORITHM_SHA1) < 0) return commit_graph_error("could not calculate signature"); if (!git_oid_equal(&cgraph_checksum, &file->checksum)) return commit_graph_error("index signature mismatch"); @@ -986,7 +986,7 @@ static int commit_graph_write( hash_cb_data.cb_data = cb_data; hash_cb_data.ctx = &ctx; - error = git_hash_ctx_init(&ctx); + error = git_hash_ctx_init(&ctx, GIT_HASH_ALGORITHM_SHA1); if (error < 0) return error; cb_data = &hash_cb_data; |