git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Denton Liu <liu.denton@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, pclouds@gmail.com
Subject: Re: [PATCH v2 3/3] submodule: document default behavior
Date: Wed, 13 Feb 2019 23:24:05 -0800	[thread overview]
Message-ID: <20190214072405.GA24259@archbookpro.localdomain> (raw)
In-Reply-To: <xmqqzhqzbki3.fsf@gitster-ct.c.googlers.com>

On Wed, Feb 13, 2019 at 10:39:48AM -0800, Junio C Hamano wrote:
> Denton Liu <liu.denton@gmail.com> writes:
> > diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
> > index 65a952fb96..2fdf9f4cf3 100644
> > --- a/Documentation/git-submodule.txt
> > +++ b/Documentation/git-submodule.txt
> > @@ -9,6 +9,7 @@ git-submodule - Initialize, update or inspect submodules
> >  SYNOPSIS
> >  --------
> >  [verse]
> > +'git submodule' [--quiet] [--cached]
> >  'git submodule' [--quiet] 'add' [<options>] [--] <repository> [<path>]
> >  'git submodule' [--quiet] 'status' [--cached] [--recursive] [--] [<path>...]
> >  'git submodule' [--quiet] 'init' [--] [<path>...]
> > @@ -28,6 +29,9 @@ For more information about submodules, see linkgit:gitsubmodules[7].
> >
> >  COMMANDS
> >  --------
> > +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.)

Thanks,

Denton

  reply	other threads:[~2019-02-14  7:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-12  4:03 [PATCH] git-submodule.txt: document default behavior Denton Liu
2019-02-12  5:33 ` Duy Nguyen
2019-02-12  9:56 ` [PATCH v2 0/3] Document git-submodule's " Denton Liu
2019-02-12  9:56   ` [PATCH v2 1/3] git-remote.txt: be specific about " Denton Liu
2019-02-12  9:56   ` [PATCH v2 2/3] git-submodule.txt: make subcommands underlined Denton Liu
2019-02-13  8:15     ` Denton Liu
2019-02-13  9:55       ` Duy Nguyen
2019-02-13 18:30       ` Junio C Hamano
2019-02-12  9:56   ` [PATCH v2 3/3] submodule: document default behavior Denton Liu
2019-02-13 18:39     ` Junio C Hamano
2019-02-14  7:24       ` Denton Liu [this message]
2019-02-14 17:41         ` Junio C Hamano
2019-02-15  9:26   ` [PATCH v3 0/1] Document git-submodule's " Denton Liu
2019-02-15  9:26     ` [PATCH v3 1/1] submodule: document " Denton Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190214072405.GA24259@archbookpro.localdomain \
    --to=liu.denton@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).