1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-04-27 12:55:10 +02:00

commit.c: make compare_commits_by_commit_date global

This helper function was introduced as a prio_queue
comparator to help topological sorting. However, other users
of prio_queue who want to replace commit_list_insert_by_date
will want to use it, too. So let's make it public.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King 2013-07-02 02:21:48 -04:00 committed by Junio C Hamano
parent 16445242ed
commit 727377ff65
2 changed files with 3 additions and 1 deletions

View File

@ -581,7 +581,7 @@ static int compare_commits_by_author_date(const void *a_, const void *b_,
return 0;
}
static int compare_commits_by_commit_date(const void *a_, const void *b_, void *unused)
int compare_commits_by_commit_date(const void *a_, const void *b_, void *unused)
{
const struct commit *a = a_, *b = b_;
/* newer commits with larger date first */

View File

@ -254,4 +254,6 @@ extern void print_commit_list(struct commit_list *list,
*/
extern void check_commit_signature(const struct commit* commit, struct signature_check *sigc);
int compare_commits_by_commit_date(const void *a_, const void *b_, void *unused);
#endif /* COMMIT_H */