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

Re: [PATCH v2 3/3] submodule: document default behavior

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 14, 2019, 17:41 UTC
Message-ID
<xmqqsgwq8dyb.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20190214072405.GA24259@archbookpro.localdomain>
Denton Liu <liu.denton@gmail.com> writes:
Show 27 quoted lines
>> > +With no arguments, the default command is 'status'.  Several subcommands are
>> > +available to perform operations on the submodules.
>>
>> I am not sure if "default is status" is really true.
>>
>>    $ git submodule status --recursive
>>    $ git submodule --recursive
>>    usage: git submodule [--quiet] ...
>>       or: ...
>>    $ git submodule -- sha1collisiondetection
>>    usage: git submodule [--quiet] ...
>>       or: ...
>>
>> If 'status' were truly the default, wouldn't the form without any
>> subcommand take any option and parameter the 'status' subcommand
>> would accept?
>
> This is very similar to git-remote. Its default command is 'show' but
> doing something like 'git remote -n' fails, even though
> 'git remote show -n' succeeds.
>
> Would it make sense to revise this back to
>
> 	With no arguments, shows the status of existing submodules.
>
> which was the phrasing I used in v1? (If this is the case, I'd also like
> to drop the first patch of this series.)

It certainly would avoid spreading misinformation to the readers by technically more correct ;-). I wasn't paying close attention to the earlier round's review, but was there something specific that we wanted to achieve by mentioning "by default we do this"? If not, the "with no arguments ..." you have in your response is concise, readable, and informative and is a good description, I think.

Thanks.
Previous: Denton LiuNext: Denton Liu
Message 12 of 14 in “git-submodule.txt: document default behavior”
  1. git-submodule.txt: document default behaviorDenton Liu, Feb 12, 2019
  2. Duy NguyenFeb 12, 2019
  3. 0/3 Document git-submodule's default behaviorDenton Liu, Feb 12, 2019
  4. 1/3 git-remote.txt: be specific about default behaviorDenton Liu, Feb 12, 2019
  5. 2/3 git-submodule.txt: make subcommands underlinedDenton Liu, Feb 12, 2019
  6. Denton LiuFeb 13, 2019
  7. Duy NguyenFeb 13, 2019
  8. Junio C HamanoFeb 13, 2019
  9. 3/3 submodule: document default behaviorDenton Liu, Feb 12, 2019
  10. Junio C HamanoFeb 13, 2019
  11. Denton LiuFeb 14, 2019
  12. Junio C HamanoFeb 14, 2019
  13. 0/1 Document git-submodule's default behaviorDenton Liu, Feb 15, 2019
  14. 1/1 submodule: document default behaviorDenton Liu, Feb 15, 2019

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.