Commit 74a2356f3bd54be374a23546704e7ec7c876a247

Stefan Sperling 2021-06-18T13:34:45

add a user data pointer to struct got_object_qid This will be required by a future 'gotadmin pack' command.

diff --git a/include/got_object.h b/include/got_object.h
index e5ebc4d..70a21a1 100644
--- a/include/got_object.h
+++ b/include/got_object.h
@@ -25,6 +25,7 @@ struct got_commit_object;
 struct got_object_qid {
 	SIMPLEQ_ENTRY(got_object_qid) entry;
 	struct got_object_id *id;
+	void *data; /* managed by API user */
 };
 
 SIMPLEQ_HEAD(got_object_id_queue, got_object_qid);
diff --git a/lib/object_parse.c b/lib/object_parse.c
index 16b8d2d..0b0c5c0 100644
--- a/lib/object_parse.c
+++ b/lib/object_parse.c
@@ -89,6 +89,7 @@ got_object_qid_alloc_partial(struct got_object_qid **qid)
 		*qid = NULL;
 		return err;
 	}
+	(*qid)->data = NULL;
 
 	return NULL;
 }