commit: remove commit_list_reverse()

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>
This commit is contained in:
René Scharfe 2012-04-25 22:35:54 +02:00 коммит произвёл Junio C Hamano
Родитель 2e7da8e9f4
Коммит a81a7fbc1a
2 изменённых файлов: 0 добавлений и 16 удалений

Просмотреть файл

@ -361,21 +361,6 @@ struct commit_list *commit_list_insert(struct commit *item, struct commit_list *
return new_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 commit_list_count(const struct commit_list *l)
{ {
unsigned c = 0; unsigned c = 0;

Просмотреть файл

@ -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 *commit_list_insert_by_date(struct commit *item,
struct commit_list **list); struct commit_list **list);
void commit_list_sort_by_date(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); void free_commit_list(struct commit_list *list);