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
Denton Liu <liu.denton@gmail.com>
Date
May 16, 2020, 08:56 UTC
Message-ID
<20200516085642.GA16726@generichostname>
In-Reply-To
<20200516055016.GB3296@konoha>
On Sat, May 16, 2020 at 11:20:16AM +0530, Shourya Shukla wrote:
Show 9 quoted lines
> 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?

I would argue that it's unnecessary to print anything. If a user provides an invalid option, then an error message will be printed. If no error is provided, then a user would assume that the command succeeded. Take, for example, `git submodule set-url` which behaves similarly. It's silent on success. Printing on success would just be noise.

Previous: Shourya ShuklaNext: Shourya Shukla
Message 5 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.