Re: [PATCH v4 2/3] worktree add: add --orphan flag
On 22/12/12 07:14PM, Ævar Arnfjörð Bjarmason wrote:
Show 23 quoted lines
>
> 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.