]> git.ipfire.org Git - thirdparty/git.git/blobdiff - object.c
branch: don't mix --edit-description
[thirdparty/git.git] / object.c
index c94be9449922de81e9576b8146d0ed08ab5ee9a6..794c86650e9a976a0667cb8103a4ae0a9a0deaf2 100644 (file)
--- a/object.c
+++ b/object.c
@@ -308,6 +308,15 @@ int object_list_contains(struct object_list *list, struct object *obj)
        return 0;
 }
 
+void object_list_free(struct object_list **list)
+{
+       while (*list) {
+               struct object_list *p = *list;
+               *list = p->next;
+               free(p);
+       }
+}
+
 /*
  * A zero-length string to which object_array_entry::name can be
  * initialized without requiring a malloc/free.