Re: [GSoC][PATCH v5] submodule: port subcommand 'set-branch' from shell to C
- From
Đoàn Trần Công Danh <congdanhqx@gmail.com>
- Date
- Jun 3, 2020, 00:12 UTC
- Message-ID
- <20200603001225.GB2222@danh.dev>
- In-Reply-To
- <xmqqzh9ls622.fsf@gitster.c.googlers.com>
On 2020-06-02 10:58:45-0700, Junio C Hamano <gitster@pobox.com> wrote:
Show 22 quoted lines
> Shourya Shukla <shouryashukla.oo@gmail.com> writes:
>
> > + * though there is nothing to make less verbose in this subcommand.
> > + */
> > + struct option options[] = {
> > + OPT_NOOP_NOARG('q', "quiet"),
> > + OPT_BOOL('d', "default", &opt_default,
> > + N_("set the default tracking branch to master")),
> > + OPT_STRING('b', "branch", &opt_branch, N_("branch"),
> > + N_("set the default tracking branch")),
> > ...
> > + OPT_END()
> > + };
> > + const char *const usage[] = {
> > + N_("git submodule--helper set-branch [-q|--quiet] (-d|--default) <path>"),
> > + N_("git submodule--helper set-branch [-q|--quiet] (-b|--branch) <branch> <path>"),
>
>
> I notice that we gained back -d and -b shorthands that was
> advertised but not implemented the previous rounds. It is a bit
> curious that we are adding these short-hands that nobody uses,
> though. I think a day will come, when all git-submodule functionalities will run by calling git-submodule--helper.
In that day, we will use current git-submodule--helper as the new git-submodule.
To me, it'll be less noise to just gs/--helper// from this file and use it as the new git-submodule, instead of changing the OPT_* all over places.
Or is that a complain for missing some tests?
-- Danh