Skip to content

Commit 1820703

Browse files
derrickstoleegitster
authored andcommitted
commit: use timestamp_t for author_date_slab
The author_date_slab is used to store the author date of a commit when walking with the --author-date flag in rev-list or log. This was added as an 'unsigned long' in 81c6b38 "log: --author-date-order" Since 'unsigned long' is ambiguous in its bit-ness across platforms (64-bit in Linux, 32-bit in Windows, for example), most references to the author dates in commit.c were converted to timestamp_t in dddbad7 "timestamp_t: a new data type for timestamps" However, the slab definition was missed, leading to a mismatch in the data types in Windows. This would not reveal itself as a bug unless someone authors a commit after February 2106, but commits can store anything as their author date. Signed-off-by: Derrick Stolee <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5589e87 commit 1820703

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

commit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ struct commit *pop_commit(struct commit_list **stack)
588588
define_commit_slab(indegree_slab, int);
589589

590590
/* record author-date for each commit object */
591-
define_commit_slab(author_date_slab, unsigned long);
591+
define_commit_slab(author_date_slab, timestamp_t);
592592

593593
static void record_author_date(struct author_date_slab *author_date,
594594
struct commit *commit)

0 commit comments

Comments
 (0)