Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion commit.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,24 @@ struct commit_list {
* The size of this struct matters in full repo walk operations like
* 'git clone' or 'git gc'. Consider using commit-slab to attach data
* to a commit instead of adding new fields here.
*
* The order of the members is partly chosen to keep the memory layout
* compact (avoiding alignment padding), and does not necessarily
* reflect their importance or grouping.
*/
struct commit {
/*
* Must be the first member, so that a "struct commit *" can be
* cast to a "struct object *".
*/
struct object object;

/* Index into the commit-slab arrays, unique per in-core commit. */
unsigned int index;

/* The committer date of this commit, without any adjustment. */
timestamp_t date;

struct commit_list *parents;

/*
Expand All @@ -35,7 +49,6 @@ struct commit {
* or get_commit_tree_oid().
*/
struct tree *maybe_tree;
unsigned int index;
};

extern int save_commit_buffer;
Expand Down
Loading