mirror of
https://github.com/libgit2/libgit2.git
synced 2026-01-25 02:56:17 +00:00
Merge pull request #6499 from libgit2/ethomson/sha256_fix_2
odb: don't unconditionally add oid_type to stream
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user