From: Derrick Stolee Date: Fri, 13 Nov 2026 14:57:29 GMT Subject: Re: [PATCH v2] commit: remove padding from struct commit Message-ID: <29490124-5020-42a1-978f-0f5283ba9e11@gmail.com> In-Reply-To: On 11/13/2026 8:30 AM, Kristofer Karlsson via GitGitGadget wrote: > From: Kristofer Karlsson > struct commit { > + /* > + * Must be the first member, so that a "struct object *" can be > + * cast to a "struct commit *". > + */ > struct object object; I think your comment is backwards: We cast a commit into an object and it works. We can't cast an arbitrary object to a commit. But maybe that direction _does_ happen if we check the object type and see that it's actually a commit underneath. > + > + /* > + * Index into the commit-slab arrays: unique per in-core commit, > + * and only meaningful within the current process. > + */ > + unsigned int index; > + > + /* > + * The committer date taken from the commit object, without any > + * adjustment. > + */ > timestamp_t date; > + Perhaps instead of "taken from the commit object" you could say "as specified by the commit object" because we may actually load the date from the commit-graph file instead of parsing a commit object. My comments are only nitpicks that _might_ improve the comments. But they might not, so do what you will. Thanks, -Stolee