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

Re: [RFH] On a script for submodules

From
Imran M Yousuf <imyousuf@gmail.com>
Date
Jan 3, 2008, 09:52 UTC
Message-ID
<7bfdc29a0801030152t25de6889wc21b9c933f5b9ab9@mail.gmail.com>
In-Reply-To
<7vsl1fs0xa.fsf@gitster.siamese.dyndns.org>
Hi all,

Sorry for referring to the blog. I am writing the details here again and also attached the script in the email.

I am fairly a new git user; I started working around with GIT on Framework development project and I noticed that GIT commands executed on the parent module is not propagated to the child modules. In some use cases it would be extremely useful (at least for me) to be able to be propagate a command from the master module to all its child at all depth. I wrote the bash shell script (in the attachment) to simply propagate commands from parent to its child. To use this script one can simply do the following (I am assuming that the file will have the name git-modules and will be an executable in $PATH):

    for: git-pull
    do: git-modules pull
    for: git-status
    do: git-modules status
    for: git-commit -a -m "This is a test commit"
    do: git-modules commit -a -m "This is a test commit"
    for: git-checkout master
    do: git-modules checkout master

Basically any git-X command can be simply be done as "git-modules X args-as-usual".

It is mainly different from the git-submodule command in its usage. I mainly wrote it to propagate commands. It could be extended for further usage as well.

I would really appreciate and welcome criticism, feedback and addition to the script.

Thank you,
On Jan 3, 2008 3:39 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 14 quoted lines
> "Imran M Yousuf" <imyousuf@gmail.com> writes:
>
> > ... I would really appreciate if someone would take their time to
> > suggest me improvements. I would also like to get some feedbacks as
> > what else could be added here. A brief description can be found in the
> > following posting.
>
> Around here, it is customary to have discussion on-list, not
> pointing at external web pages and repositories.  I would
> suggest starting by stating what the overall design is and how
> it meshes with existing git-submodule command and its design.
>
>
>
-- 
Imran M Yousuf
Previous: Junio C HamanoNext: Imran M Yousuf
Message 3 of 4 in “[RFH] On a script for submodules”
  1. Imran M YousufJan 3, 2008
  2. Junio C HamanoJan 3, 2008
  3. Imran M YousufJan 3, 2008
  4. Imran M YousufJan 6, 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.