Junio C Hamano <gitster@xxxxxxxxx> wrote: > Eric Wong <e@xxxxxxxxx> writes: > > > Comments stating that "struct hashmap_entry" must be the first > > member in a struct are no longer valid. > > After this patch, there is one "/* must be the first member! */" > comment left in convert.c, which is both misleading and unfortunate; > a structure 'subprocess_entry' wants to be the first field of any > enclosing structure, where 'subprocess_entry' has a hashmap_entry as > its first field. Oops, I was only grepping for hashmap_entry :x Thanks for the sharp eyes :> Also, the first member requirement for the oidmap stuff could be lifted sometime in the future... ----8<----- Subject: [PATCH] convert: drop invalid comment for subprocess_entry "struct hashmap_entry" inside "struct subprocess_entry" no longer needs to be the first member of any struct, so the old comment is no longer true. Signed-off-by: Eric Wong <e@xxxxxxxxx> Reported-by: Junio C Hamano <gitster@xxxxxxxxx> --- convert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/convert.c b/convert.c index 94ff837649..93c1e1eae9 100644 --- a/convert.c +++ b/convert.c @@ -753,7 +753,7 @@ static int apply_single_file_filter(const char *path, const char *src, size_t le #define CAP_DELAY (1u<<2) struct cmd2process { - struct subprocess_entry subprocess; /* must be the first member! */ + struct subprocess_entry subprocess; unsigned int supported_capabilities; };