sequencer: introduce todo_list_write_to_file()
[gitweb.git] / oidset.c
index 9836d427efcba2c75e34c4077cf96b12c71e9610..fe4eb921df81bbabe1b95bd7f594235f360eec7d 100644 (file)
--- a/oidset.c
+++ b/oidset.c
@@ -1,6 +1,13 @@
 #include "cache.h"
 #include "oidset.h"
 
+void oidset_init(struct oidset *set, size_t initial_size)
+{
+       memset(&set->set, 0, sizeof(set->set));
+       if (initial_size)
+               kh_resize_oid(&set->set, initial_size);
+}
+
 int oidset_contains(const struct oidset *set, const struct object_id *oid)
 {
        khiter_t pos = kh_get_oid(&set->set, *oid);