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

Re: [PATCH] - Updated usage and simplified sub-command action invocation

From
Imran M Yousuf <imyousuf@gmail.com>
Date
Jan 10, 2008, 07:41 UTC
Message-ID
<7bfdc29a0801092341j60dcb081xe4bf6c22cbaf30f2@mail.gmail.com>
In-Reply-To
<7vzlve6t69.fsf@gitster.siamese.dyndns.org>
On Jan 10, 2008 1:22 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 17 quoted lines
> "Imran M Yousuf" <imyousuf@gmail.com> writes:
>
> > On Jan 10, 2008 12:23 PM, Junio C Hamano <gitster@pobox.com> wrote:
> > ...
> >> I somehow feel that syntactically the original implementation
> >> that allowed subcommand specific options to come before the
> >> subcommand name was a mistake.  It may be easier for users that
> >> both "-b branch add" and "add -b branch" are accepted, but I
> >> have to wonder if it would really hurt if we made "-b branch
> >> add" a syntax error.
> >
> > I will recode it to have all options except for --quiet (which is
> > inverse of -v or --verbose) be mentioned after the subcommand.
>
> Just a word of caution when dealing with me.
>
> Unlike Linus, I am not always right.  And other people on the
I will cautiously remember the caution :).
Show 10 quoted lines
> list who are here longer already know this. I am reasonably sure
> that some of them will disagree with me on design issues like
> this one; I mildly suspect that this forbidding "-b branch add"
> might be met with resistance from existing users.
>
> You do not have to agree with me on every little detail I
> mention.  If you feel a design issue might be contentious, it
> could turn out to be a better use of your time to keep the code
> as it is while waiting to see if other people would offer better
> alternatives.

Actually the best design, IMHO, is to have separate commands itself for them, that is submodule-add, submodule-init, submodule-update, submodule-status or submodule. I think this would also make it coherent with other commands such as git-ls, git-merge, git-show. In that way we could have a common .sh file that will contain the common functions and can be accessed from the command shell scripts. This would also make it quite simple.

Show 6 quoted lines
>
> > Actually module_$command is not possible because only add's module is
> > module_add rest are modules_$command....
>
> Is there a fundamental reason why you cannot rename them to be
> more consistent?

In fact it is consistent, add works on a single module only, whereas rest of the command works either on 1 or more. Thus having plural (modules) is logical.

>
Best regards,
-- 
Imran M Yousuf
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 7 in “- Updated usage and simplified sub-command action invocation”
  1. - Updated usage and simplified sub-command action invocationimyousuf@gmail.com, Jan 10, 2008
  2. Junio C HamanoJan 10, 2008
  3. Imran M YousufJan 10, 2008
  4. Junio C HamanoJan 10, 2008
  5. Imran M YousufJan 10, 2008
  6. Junio C HamanoJan 12, 2008
  7. Imran M YousufJan 11, 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.