Unverified Commit 6f2eedb7 by Edward Thomson Committed by GitHub

Merge pull request #6499 from libgit2/ethomson/sha256_fix_2

odb: don't unconditionally add oid_type to stream
parents bf7d3888 d16b59c9
......@@ -171,7 +171,9 @@ struct git_odb_stream {
unsigned int mode;
void *hash_ctx;
#ifdef GIT_EXPERIMENTAL_SHA256
git_oid_t oid_type;
#endif
git_object_size_t declared_size;
git_object_size_t received_bytes;
......
......@@ -1704,7 +1704,9 @@ int git_odb_open_wstream(
(error = hash_header(ctx, size, type)) < 0)
goto done;
#ifdef GIT_EXPERIMENTAL_SHA256
(*stream)->oid_type = db->options.oid_type;
#endif
(*stream)->hash_ctx = ctx;
(*stream)->declared_size = size;
(*stream)->received_bytes = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment