Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Move commit_list_count() to commit.c
[gitweb.git]
/
commit.c
diff --git
a/commit.c
b/commit.c
index e2d8624d9c19adde87ae521361f4ccd8260c06a0..bbf9c75416537f4e64416d54b03cd00f9d0a56db 100644
(file)
--- a/
commit.c
+++ b/
commit.c
@@
-325,6
+325,14
@@
struct commit_list *commit_list_insert(struct commit *item, struct commit_list *
return new_list;
}
+unsigned commit_list_count(const struct commit_list *l)
+{
+ unsigned c = 0;
+ for (; l; l = l->next )
+ c++;
+ return c;
+}
+
void free_commit_list(struct commit_list *list)
{
while (list) {