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/indexer.c | |
parent | 3fff59705fec852b97639364ca7b3e84ff7040b7 (diff) | |
download | libgit2-2a713da1ec2e9f74c9edc75b06540ab095c68c34.tar.gz |
hash: accept the algorithm in inputs
Diffstat (limited to 'src/indexer.c')
-rw-r--r-- | src/indexer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/indexer.c b/src/indexer.c index ce7737500..c3b1aee32 100644 --- a/src/indexer.c +++ b/src/indexer.c @@ -152,8 +152,8 @@ int git_indexer_new( idx->mode = mode ? mode : GIT_PACK_FILE_MODE; git_buf_init(&idx->entry_data, 0); - if ((error = git_hash_ctx_init(&idx->hash_ctx)) < 0 || - (error = git_hash_ctx_init(&idx->trailer)) < 0 || + if ((error = git_hash_ctx_init(&idx->hash_ctx, GIT_HASH_ALGORITHM_SHA1)) < 0 || + (error = git_hash_ctx_init(&idx->trailer, GIT_HASH_ALGORITHM_SHA1)) < 0 || (error = git_oidmap_new(&idx->expected_oids)) < 0) goto cleanup; |