Re: [GSoC][PATCH v5] submodule: port subcommand 'set-branch' from shell to C
- From
Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
- Date
- Jun 2, 2020, 19:10 UTC
- Message-ID
- <CA+ARAtoDzoU=eu0mJom7LwVF60k4CtiuBha-RC7zkx9o7O=H3A@mail.gmail.com>
- In-Reply-To
- <1b851e49-3bb1-3b59-7f24-b903c5514391@gmail.com>
On Wed, Jun 3, 2020 at 12:31 AM Kaartic Sivaraam <kaartic.sivaraam@gmail.com> wrote:
Show 41 quoted lines
> > I also noticed one other thing. A quote from > Documentation/CodingGuidelines regarding the usage for reference: > > > Optional parts are enclosed in square brackets: > > [<extra>] > > (Zero or one <extra>.) > > > > --exec-path[=<path>] > > (Option with an optional argument. Note that the "=" is inside the > > brackets.) > > > > [<patch>...] > > (Zero or more of <patch>. 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: > > [(<rev> | <range>)...] > > (Any number of either <rev> or <range>. Parens are needed to make > > it clear that "..." pertains to both <rev> and <range>.) > > > > [(-p <parent>)...] > > (Any number of option -p, each with one <parent> argument.) > > > > git remote set-head <name> (-a | -d | <branch>) > > (One and only one of "-a", "-d" or "<branch>" _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] <path> > > ... and ... > > git submodule--helper set-branch [-q|--quiet] [-b | > --branch]<branch> <path> >
Apologies, my mail client messed a little with the formatting. This should actually be:
git submodule--helper set-branch [-q | --quiet] [-b | --branch] <branch> <path>
Show 11 quoted lines
> ... respectively. > > > + NULL > > + }; > > --- > Footnotes: > > [1]: > https://github.com/periperidip/git/commit/9a8918bf0688c583740b3dddafdba82f47972442#r39606384 >
-- Sivaraam