Subject: Re: [RFC] struct *_struct

From: Junio C Hamano <[email-masked]>
Date: Wed, 04 Aug 2010 12:24:29 -0700

Jared Hance <[email-masked]> writes:

>     - We use this style in only 3 cases

I think they were early-days inertia between me and Linus.  I hate "struct
foo_struct" (and "typedef foo struct foo") myself and that is why we don't
see many others.

I am personally Ok if you want to give them more sensible names.  Doing
s/_struct$// is a no-brainer for "diff_queue_struct", but I do not think
doing that alone would be a good idea for "cmd_struct" and "dir_struct".

I'd suggest calling the former "cmd_desc", as it is a set of info on a
single command.  "dir_struct" is a table that records a set of paths in
the whole work tree and it is not about a single directory (nor a single
entry in that table, which is "dir_entry"); as such "dir" that sounds too
similar to DIR that is what opendir() returns (i.e. a single directory)
may probably not be a good name for it.