From: Kaartic Sivaraam Date: Tue, 02 Jun 2020 19:10:58 GMT Subject: Re: [GSoC][PATCH v5] submodule: port subcommand 'set-branch' from shell to C Message-ID: In-Reply-To: <1b851e49-3bb1-3b59-7f24-b903c5514391@gmail.com> On Wed, Jun 3, 2020 at 12:31 AM Kaartic Sivaraam wrote: > > I also noticed one other thing. A quote from > Documentation/CodingGuidelines regarding the usage for reference: > > > Optional parts are enclosed in square brackets: > > [] > > (Zero or one .) > > > > --exec-path[=] > > (Option with an optional argument. Note that the "=" is inside the > > brackets.) > > > > [...] > > (Zero or more of . Note that the dots are inside, not > > outside the brackets.) > > > > Multiple alternatives are indicated with vertical bars: > > [-q | --quiet] > > [--utf8 | --no-utf8] > > > > Parentheses are used for grouping: > > [( | )...] > > (Any number of either or . Parens are needed to make > > it clear that "..." pertains to both and .) > > > > [(-p )...] > > (Any number of option -p, each with one argument.) > > > > git remote set-head (-a | -d | ) > > (One and only one of "-a", "-d" or "" _must_ (no square > > brackets) be provided.) > > So, according to this, I think the usage should be ... > > git submodule--helper set-branch [-q | --quiet] [-d | --default] > > ... and ... > > git submodule--helper set-branch [-q|--quiet] [-b | > --branch] > Apologies, my mail client messed a little with the formatting. This should actually be: git submodule--helper set-branch [-q | --quiet] [-b | --branch] > ... respectively. > > > + NULL > > + }; > > --- > Footnotes: > > [1]: > https://github.com/periperidip/git/commit/9a8918bf0688c583740b3dddafdba82f47972442#r39606384 > -- Sivaraam