From: Jacob Abel Date: Mon, 12 Dec 2022 22:39:47 GMT Subject: Re: [PATCH v4 2/3] worktree add: add --orphan flag Message-ID: <20221212223939.oetchpx4u7uysd25@phi> In-Reply-To: <221212.864ju05vyx.gmgdl@evledraar.gmail.com> On 22/12/12 07:14PM, Ævar Arnfjörð Bjarmason wrote: > > On Mon, Dec 12 2022, Jacob Abel wrote: > > > On 22/12/12 09:11AM, Ævar Arnfjörð Bjarmason wrote: > >> > >> > + struct strbuf symref = STRBUF_INIT; > >> > + struct child_process cp = CHILD_PROCESS_INIT; > >> > + cp.git_cmd = 1; > >> > >> (aside: We usually split up variables & decls, I think this is better > >> right before the run_command() line). > > > > Sorry, I'm not quite clear what you mean. > > I mean that we usually put two newlines between the last deceleration > and the start of any code. > > And additionally, that the usual pattern for CHILD_PROCESS_INIT is to do > these "flag" assignments right before the run_command(). > > See e.g. the code in "check_clean_worktree()" > > So following its example would resolve the decl style nit Ah OK. I understand what you mean now. I've made the change.