Move commit_list_count() to commit.c
This function is useful outside builtin-merge-recursive, for example in builtin-merge. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
0989fe9623
commit
653194758e
@ -42,14 +42,6 @@ static struct tree *shift_tree_object(struct tree *one, struct tree *two)
|
||||
* - *(int *)commit->object.sha1 set to the virtual id.
|
||||
*/
|
||||
|
||||
static unsigned commit_list_count(const struct commit_list *l)
|
||||
{
|
||||
unsigned c = 0;
|
||||
for (; l; l = l->next )
|
||||
c++;
|
||||
return c;
|
||||
}
|
||||
|
||||
static struct commit *make_virtual_commit(struct tree *tree, const char *comment)
|
||||
{
|
||||
struct commit *commit = xcalloc(1, sizeof(struct commit));
|
||||
|
||||
Reference in New Issue
Block a user