diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-11-18 18:23:52 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-18 18:23:52 +0900 |
commit | 62ca33e02a4ea93dd59538ac986a082430253b27 (patch) | |
tree | b5f5af9c87a64536f0e7ada9e0066e4f5d29af4e /commit.c | |
parent | d166e6afe5f257217836ef24a73764eba390c58d (diff) | |
parent | 561b583749b7428f1790f03164d0d0e75be71d7b (diff) | |
download | git-62ca33e02a4ea93dd59538ac986a082430253b27.tar.gz |
Merge branch 'ds/reachable-topo-order'
The revision walker machinery learned to take advantage of the
commit generation numbers stored in the commit-graph file.
* ds/reachable-topo-order:
t6012: make rev-list tests more interesting
revision.c: generation-based topo-order algorithm
commit/revisions: bookkeeping before refactoring
revision.c: begin refactoring --topo-order logic
test-reach: add rev-list tests
test-reach: add run_three_modes method
prio-queue: add 'peek' operation
Diffstat (limited to 'commit.c')
-rw-r--r-- | commit.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -657,11 +657,10 @@ struct commit *pop_commit(struct commit_list **stack) /* count number of children that have not been emitted */ define_commit_slab(indegree_slab, int); -/* record author-date for each commit object */ define_commit_slab(author_date_slab, timestamp_t); -static void record_author_date(struct author_date_slab *author_date, - struct commit *commit) +void record_author_date(struct author_date_slab *author_date, + struct commit *commit) { const char *buffer = get_commit_buffer(commit, NULL); struct ident_split ident; @@ -686,8 +685,8 @@ fail_exit: unuse_commit_buffer(commit, buffer); } -static int compare_commits_by_author_date(const void *a_, const void *b_, - void *cb_data) +int compare_commits_by_author_date(const void *a_, const void *b_, + void *cb_data) { const struct commit *a = a_, *b = b_; struct author_date_slab *author_date = cb_data; |