From: Junio C Hamano Date: Fri, 22 Dec 2017 20:12:00 GMT Subject: Re: [PATCH] oidmap.h: strongly discourage using OIDMAP_INIT directly Message-ID: In-Reply-To: <20171222171635.GA230194@google.com> Brandon Williams writes: >> -#define OIDMAP_INIT { { NULL } } >> +/* >> + * This macro initializes the data structure only incompletely, just enough >> + * to call oidmap_get() on an empty map. Use oidmap_init() instead. >> + */ >> +#define OIDMAP_INIT_INCOMPLETELY { { NULL } } > > This is one way of approaching the problem. Couldn't we also take the > approach like we have with oidset and ensure that when oidmap_get() or > _put() are called that if the oidmap isn't initialized, we simply do > that then? Hmph. Can you show how the alternative code would look like?