commit: remove commit_list_reverse()
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>
Wed, 25 Apr 2012 20:35:54 +0000 (22:35 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 25 Apr 2012 21:51:21 +0000 (14:51 -0700)
The function commit_list_reverse() is not used anymore; delete it.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit.c
commit.h

index 8361acb6cf551d4a94a838a485766e0832447188..9ed36c7db5ee0d2e820a01b27507c4ab0afe9663 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -361,21 +361,6 @@ struct commit_list *commit_list_insert(struct commit *item, struct commit_list *
        return new_list;
 }
 
-void commit_list_reverse(struct commit_list **list_p)
-{
-       struct commit_list *prev = NULL, *curr = *list_p, *next;
-
-       if (!list_p)
-               return;
-       while (curr) {
-               next = curr->next;
-               curr->next = prev;
-               prev = curr;
-               curr = next;
-       }
-       *list_p = prev;
-}
-
 unsigned commit_list_count(const struct commit_list *l)
 {
        unsigned c = 0;
index bd17770e8557b5e9542ae7ddf64a862deb394889..ccaa20b2621bd3856f7eafbe1193a20326278ae3 100644 (file)
--- a/commit.h
+++ b/commit.h
@@ -59,7 +59,6 @@ unsigned commit_list_count(const struct commit_list *l);
 struct commit_list *commit_list_insert_by_date(struct commit *item,
                                    struct commit_list **list);
 void commit_list_sort_by_date(struct commit_list **list);
-void commit_list_reverse(struct commit_list **list_p);
 
 void free_commit_list(struct commit_list *list);