Re: [PATCH 09/15] hash: set and copy algo field in struct object_id
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Apr 11, 2021, 11:57 UTC
- Message-ID
- <87k0p9f2z9.fsf@evledraar.gmail.com>
- In-Reply-To
- <20210410152140.3525040-10-sandals@crustytoothpaste.net>
On Sat, Apr 10 2021, brian m. carlson wrote:
Show 21 quoted lines
> const struct object_id null_oid;
> static const struct object_id empty_tree_oid = {
> - EMPTY_TREE_SHA1_BIN_LITERAL
> + EMPTY_TREE_SHA1_BIN_LITERAL,
> + GIT_HASH_SHA1,
> };
> static const struct object_id empty_blob_oid = {
> - EMPTY_BLOB_SHA1_BIN_LITERAL
> + EMPTY_BLOB_SHA1_BIN_LITERAL,
> + GIT_HASH_SHA1,
> };
> static const struct object_id empty_tree_oid_sha256 = {
> - EMPTY_TREE_SHA256_BIN_LITERAL
> + EMPTY_TREE_SHA256_BIN_LITERAL,
> + GIT_HASH_SHA256,
> };
> static const struct object_id empty_blob_oid_sha256 = {
> - EMPTY_BLOB_SHA256_BIN_LITERAL
> + EMPTY_BLOB_SHA256_BIN_LITERAL,
> + GIT_HASH_SHA256,
> };In this and some other patches we're continuing to add new fields to structs without using designated initializers.
Not a new problem at all, just a note that if you re-roll I for one would very much appreciate starting by migrating over to that. It makes for much easier reading in subsequent patches in this series, and in future ones.