Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit a81a7fb

Browse files
René Scharfegitster
authored andcommitted
commit: remove commit_list_reverse()
The function commit_list_reverse() is not used anymore; delete it. Signed-off-by: Rene Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2e7da8e commit a81a7fb

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

commit.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -361,21 +361,6 @@ struct commit_list *commit_list_insert(struct commit *item, struct commit_list *
361361
return new_list;
362362
}
363363

364-
void commit_list_reverse(struct commit_list **list_p)
365-
{
366-
struct commit_list *prev = NULL, *curr = *list_p, *next;
367-
368-
if (!list_p)
369-
return;
370-
while (curr) {
371-
next = curr->next;
372-
curr->next = prev;
373-
prev = curr;
374-
curr = next;
375-
}
376-
*list_p = prev;
377-
}
378-
379364
unsigned commit_list_count(const struct commit_list *l)
380365
{
381366
unsigned c = 0;

commit.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ unsigned commit_list_count(const struct commit_list *l);
5959
struct commit_list *commit_list_insert_by_date(struct commit *item,
6060
struct commit_list **list);
6161
void commit_list_sort_by_date(struct commit_list **list);
62-
void commit_list_reverse(struct commit_list **list_p);
6362

6463
void free_commit_list(struct commit_list *list);
6564

0 commit comments

Comments
 (0)