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>
Jeff King committed
Jul 2, 2013 at 02:21 UTC
727377ff65f8b38990d4aa13fc6979d9a8cd6756
2 files changed
+3
-1
commit.c
+1
-1
@@ -581,7 +581,7 @@ static int compare_commits_by_author_date(const void *a_, const void *b_,
581
return 0;
582
}
583
584
-static int compare_commits_by_commit_date(const void *a_, const void *b_, void *unused)
584
+int compare_commits_by_commit_date(const void *a_, const void *b_, void *unused)
585
{
586
const struct commit *a = a_, *b = b_;
587
/* newer commits with larger date first */
commit.h
+2
@@ -254,4 +254,6 @@ extern void print_commit_list(struct commit_list *list,
254
*/
255
extern void check_commit_signature(const struct commit* commit, struct signature_check *sigc);
256
257
+int compare_commits_by_commit_date(const void *a_, const void *b_, void *unused);
258
+
259
#endif /* COMMIT_H */