From: Junio C Hamano Date: Thu, 18 Apr 2024 20:42:20 GMT Subject: Re: [PATCH 2/5] sequencer: start removing private fields from public API Message-ID: In-Reply-To: <2beedb4547013629a507d646d582ca6b3f420c2c.1713445918.git.phillip.wood@dunelm.org.uk> Phillip Wood writes: > +/* > + * A 'struct replay_ctx' represents the private state of the sequencer. > + */ > +struct replay_ctx { > + /* > + * Stores the reflog message that will be used when creating a > + * commit. Points to a static buffer and should not be free()'d. > + */ > + const char *reflog_message; > +}; > + > +struct replay_ctx* replay_ctx_new(void) Style. Also if you intend to make the structure opaque and private, shouldn't you make this static to make it truly internal? The initializer of the containing replay_opts structure would be the only thing that needs to know how to instantiate it, no? Or does a replay_ctx has reason to exist outside the context of an instance of replay_opts? i.e. static struct replay_ctx *replay_ctx_new(void) The remainder seem mechanical so I'll skip them.