Skip to content

Commit

Permalink
commit: remove commit_list_reverse()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
René Scharfe authored and Junio C Hamano committed Apr 25, 2012
1 parent 2e7da8e commit a81a7fb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
15 changes: 0 additions & 15 deletions commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion commit.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit a81a7fb

Please sign in to comment.