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

Re: [PATCH 2/2] submodule: Add 'quiet' option in subcommand 'set-branch'

From
Shourya Shukla <shouryashukla.oo@gmail.com>
Date
May 16, 2020, 05:50 UTC
Message-ID
<20200516055016.GB3296@konoha>
In-Reply-To
<20200514101534.GB28018@generichostname>
On 14/05 06:15, Denton Liu wrote:
> Hi Shourya,
> 
> I'm not really sure if we should have this patch at all since I don't
> think that set-branch should be printing anything at all.

I thought that the Documentation has the mention of the `quiet` and it wouldn't harm printing something when the branch is set. Is this not the right way to tackle this?

Show 14 quoted lines
> But I'll give some comments anyway. Hopefully they'll be enlightening.
> 
> On Thu, May 14, 2020 at 01:47:37AM +0530, Shourya Shukla wrote:
> > The subcommand 'set-branch' had the 'quiet' option which was
> > introduced in b57e8119e6 by Denton Liu but was never utilised due to
> 
> We typically refer to commits by the "reference" format. You can get
> that as follows:
> 
> 	$ git show --pretty=ref -s b57e8119e6
> 	b57e8119e6 (submodule: teach set-branch subcommand, 2019-02-08)
> 
> In addition, I don't think it's necessary to mention me by name in this
> case.
Okay, I did not know that, will change in the next version.
Show 6 quoted lines
> > -		printf(_("Default tracking branch set to '%s' successfully\n"), newbranch);
> > +		if (!(quiet ? OPT_QUIET : 0))
> 
> This is needlessly complicated... Can't this just be written as
> 
> 	if (!quiet)
Okay, will do.
Previous: Denton LiuNext: Denton Liu
Message 4 of 14 in “submodule: port subcommand 'set-branch' from shell to C”
  1. 1/2 submodule: port subcommand 'set-branch' from shell to CShourya Shukla, May 13, 2020
  2. 2/2 submodule: Add 'quiet' option in subcommand 'set-branch'Shourya Shukla, May 13, 2020
  3. Denton LiuMay 14, 2020
  4. Shourya ShuklaMay 16, 2020
  5. Denton LiuMay 16, 2020
  6. Shourya ShuklaMay 16, 2020
  7. Denton LiuMay 16, 2020
  8. Kaartic SivaraamMay 14, 2020
  9. Junio C HamanoMay 17, 2020
  10. Kaartic SivaraamMay 17, 2020
  11. Denton LiuMay 14, 2020
  12. Shourya ShuklaMay 16, 2020
  13. Denton LiuMay 16, 2020
  14. Đoàn Trần Công DanhMay 17, 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.