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
This commit is contained in:
9
commit.c
9
commit.c
@ -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;
|
||||
|
Reference in New Issue
Block a user