provide an initializer for "struct object_info"
[gitweb.git] / cache.h
diff --git a/cache.h b/cache.h
index 40671d160a0a31a475d7f317966798d5dea248b7..1fa2871b4346914406b858fc23ade2781cb9441e 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -1542,6 +1542,13 @@ struct object_info {
                } packed;
        } u;
 };
+
+/*
+ * Initializer for a "struct object_info" that wants no items. You may
+ * also memset() the memory to all-zeroes.
+ */
+#define OBJECT_INFO_INIT {NULL}
+
 extern int sha1_object_info_extended(const unsigned char *, struct object_info *, unsigned flags);
 
 /* Dumb servers support */