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

Re: [PATCH] Simplified the invocation of command action in submodule

From
Imran M Yousuf <imyousuf@gmail.com>
Date
Jan 10, 2008, 03:05 UTC
Message-ID
<7bfdc29a0801091905k1ef9285em170b26a332a30535@mail.gmail.com>
In-Reply-To
<8c5c35580801090224l1e30df6cw5d3fefe99c0cdd7@mail.gmail.com>
On Jan 9, 2008 4:24 PM, Lars Hjemli <lh@elementstorage.no> wrote:
Show 33 quoted lines
> On Jan 9, 2008 10:51 AM, Imran M Yousuf <imyousuf@gmail.com> wrote:
> > On Jan 9, 2008 2:59 PM, Johannes Sixt <j.sixt@viscovery.net> 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 <repository> [<path>]
> -'git-submodule' [--quiet] [--cached] [status|init|update] [--] [<path>...]
> +'git-submodule' [--quiet] [--cached] [status] [--] [<path>...]
> +'git-submodule' [--quiet] init [--] [<path>...]
> +'git-submodule' [--quiet] update [--] [<path>...]
> +
>

This change makes a lot sense. Thus I will make sure that it is used in this manner :). Thanks a lot for clarifying it Lars. I wanted to know what is the purpose of '--'? If it is simply meant to be a separator than fine; else I would be grateful if you would please explain its purpose, so that I do not again implement wrongly :).

Show 5 quoted lines
>
>  COMMANDS
> --
> 1.5.3.7.1141.g4eb39
>
-- 
Imran M Yousuf
Previous: Lars Hjemli
Message 12 of 12 in “Simplified the invocation of command action in submodule”
  1. Simplified the invocation of command action in submoduleimyousuf@gmail.com, Jan 9, 2008
  2. Junio C HamanoJan 9, 2008
  3. Imran M YousufJan 9, 2008
  4. Johannes SixtJan 9, 2008
  5. Imran M YousufJan 9, 2008
  6. Johannes SixtJan 9, 2008
  7. Imran M YousufJan 9, 2008
  8. Johannes SixtJan 9, 2008
  9. Imran M YousufJan 9, 2008
  10. Junio C HamanoJan 9, 2008
  11. Lars HjemliJan 9, 2008
  12. Imran M YousufJan 10, 2008

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.