Re: [PATCH v4 2/3] worktree add: add --orphan flag
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Dec 12, 2022, 18:14 UTC
- Message-ID
- <221212.864ju05vyx.gmgdl@evledraar.gmail.com>
- In-Reply-To
- <20221212145515.pohzoyllo3bgz7eb@phi>
On Mon, Dec 12 2022, Jacob Abel wrote:
Show 10 quoted lines
> 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