git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Junio C HamanoNext: Junio C Hamano
Message 20 of 29 in “submodule: port subcommand 'set-branch' from shell to C”
  1. submodule: port subcommand 'set-branch' from shell to CShourya Shukla, May 21, 2020
  2. Junio C HamanoMay 21, 2020
  3. Denton LiuMay 21, 2020
  4. Junio C HamanoMay 21, 2020
  5. Shourya ShuklaMay 22, 2020
  6. Junio C HamanoMay 24, 2020
  7. Đoàn Trần Công DanhMay 21, 2020
  8. Johannes SchindelinMay 22, 2020
  9. Junio C HamanoMay 24, 2020
  10. Junio C HamanoMay 24, 2020
  11. submodule: port subcommand 'set-branch' from shell to CShourya Shukla, May 23, 2020
  12. Kaartic SivaraamMay 23, 2020
  13. Đoàn Trần Công DanhMay 23, 2020
  14. Shourya ShuklaMay 27, 2020
  15. Đoàn Trần Công DanhMay 28, 2020
  16. Đoàn Trần Công DanhMay 28, 2020
  17. Đoàn Trần Công DanhMay 28, 2020
  18. [GSoC][PATCH v5] submodule: port subcommand 'set-branch' from shell to CShourya Shukla, Jun 2, 2020
  19. Junio C HamanoJun 2, 2020
  20. Đoàn Trần Công DanhJun 3, 2020
  21. Junio C HamanoJun 3, 2020
  22. Shourya ShuklaJun 4, 2020
  23. Christian CouderJun 4, 2020
  24. Junio C HamanoJun 4, 2020
  25. Kaartic SivaraamJun 2, 2020
  26. Kaartic SivaraamJun 2, 2020
  27. Christian CouderJun 2, 2020
  28. Shourya ShuklaJun 4, 2020
  29. Kaartic SivaraamJun 4, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.