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 9, 2008, 09:07 UTC
Message-ID
<7bfdc29a0801090107j292eeaf5u2b49651ed23ca783@mail.gmail.com>
In-Reply-To
<47848CDD.7050806@viscovery.net>
I already saw that mistake Johannes, thank you for pointing it out.
On Jan 9, 2008 2:59 PM, Johannes Sixt <j.sixt@viscovery.net> wrote:
Show 83 quoted lines
> imyousuf@gmail.com schrieb:
>
> > @@ -16,6 +16,7 @@ update=
> >  status=
> >  quiet=
> >  cached=
> > +command=
> >
> >  #
> >  # print stuff on stdout unless -q was specified
> > @@ -293,20 +294,23 @@ modules_list()
> >       done
> >  }
> >
> > +# command specifies the whole function name since
> > +# one of theirs prefix is module not modules
> >  while test $# != 0
> >  do
> >       case "$1" in
> >       add)
> >               add=1
> > +             command="module_$1"
> >               ;;
> >       init)
> > -             init=1
> > +             command="modules_$1"
> >               ;;
> >       update)
> > -             update=1
> > +             command="modules_$1"
> >               ;;
> >       status)
> > -             status=1
> > +             command="modules_list"
> >               ;;
> >       -q|--quiet)
> >               quiet=1
> > @@ -320,7 +324,7 @@ do
> >               branch="$2"; shift
> >               ;;
> >       --cached)
> > -             cached=1
> > +             command="modules_list"
>
> Don't remove cached=1 because otherwise --cached is effectively ignored.
>
> >               ;;
> >       --)
> >               break
> > @@ -345,20 +349,8 @@ case "$add,$branch" in
> >       ;;
> >  esac
> >
> > -case "$add,$init,$update,$status,$cached" in
> > -1,,,,)
> > -     module_add "$@"
> > -     ;;
> > -,1,,,)
> > -     modules_init "$@"
> > -     ;;
> > -,,1,,)
> > -     modules_update "$@"
> > -     ;;
> > -,,,*,*)
> > -     modules_list "$@"
> > -     ;;
> > -*)
> > +if [ -z $command ]; then
> >       usage
> > -     ;;
> > -esac
> > +else
> > +     "$command" "$@"
> > +fi
>
> - Previously 'git submodule' was equvalent to 'git submodule status', now
> it is an error.
>
> - Previously, passing --cached to add, init, or update was an error, now
> it is not.
>
> -- Hannes
>
-- 
Imran M Yousuf
Entrepreneur & Software Engineer
Smart IT Engineering
Dhaka, Bangladesh
Email: imran@smartitengineering.com
Mobile: +880-1711402557
Previous: Johannes SixtNext: Johannes Sixt
Message 5 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.