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.