Thread (1 message) 1 message, 1 author, 2019-02-14

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

From: Junio C Hamano <hidden>
Date: 2019-02-14 17:41:53

Denton Liu [off-list ref] writes:
quoted
quoted
+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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help