From: Lars Hjemli Date: Wed, 09 Jan 2008 10:24:23 GMT Subject: Re: [PATCH] Simplified the invocation of command action in submodule Message-ID: <8c5c35580801090224l1e30df6cw5d3fefe99c0cdd7@mail.gmail.com> In-Reply-To: <7bfdc29a0801090151k22d3cd5aqedb0d4860868d4d9@mail.gmail.com> On Jan 9, 2008 10:51 AM, Imran M Yousuf wrote: > On Jan 9, 2008 2:59 PM, Johannes Sixt wrote: > > > > - Previously, passing --cached to add, init, or update was an error, now > > it is not. > > The usage statement and this behaviour is rather contradicting. The > usage says that --cached can be used with all commands; so I am not > sure whether using --cached with add should be an error or not. IMHO, > if the previous implementation was right than the USAGE has to be > changed, and if the previous implementation was incorrect, than if the > default command is set to status than current implementation is right. > > I would like to get comment on this until I fix the patch and resend it. --cached only makes sense for the status subcommand, so the usage/manpage probably should have looked like this (except for the whitespace mangling...): diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt index cffc6d4..331e806 100644 --- a/Documentation/git-submodule.txt +++ b/Documentation/git-submodule.txt @@ -10,7 +10,10 @@ SYNOPSIS -------- [verse] 'git-submodule' [--quiet] [-b branch] add [] -'git-submodule' [--quiet] [--cached] [status|init|update] [--] [...] +'git-submodule' [--quiet] [--cached] [status] [--] [...] +'git-submodule' [--quiet] init [--] [...] +'git-submodule' [--quiet] update [--] [...] + COMMANDS -- 1.5.3.7.1141.g4eb39