threads / discuss / 11448

About the .gitmodules file

Subject: About the .gitmodules file

## tl;dr

2 messages between Jan 2, 2008 and Jan 2, 2008.

replies: 1people: 2as markdown or json

Imran M Yousuf· Jan 2, 2008, 10:39 UTC · lore
Hi All,

I need a help in order to parse the .gitmodules file generated on "git-submodule add". An entry for a submodule in that file looks like:

    [submodule "a"]
            path = a
            url = /home/imyousuf/projects/git-projs/smart-sip/submodules/a/.git

I want to parse this file to know the location of my module so that when I got git-commit on the parent project my script will also traverse the submodule hierarchy. I wanted to know whether path = a noted the relative path from the current directory or not.

Thanks in advance,
-- 
Imran M Yousuf
Miklos Vajna· Jan 2, 2008, 17:13 UTC · re: Imran M Yousuf · lore

Re: About the .gitmodules file

On Wed, Jan 02, 2008 at 04:39:24PM +0600, Imran M Yousuf <imyousuf@gmail.com> wrote:
Show 5 quoted lines
> "git-submodule add". An entry for a submodule in that file looks like:
> 
>     [submodule "a"]
>             path = a
>             url = /home/imyousuf/projects/git-projs/smart-sip/submodules/a/.git

that means: the submodule is under /root_of_the_repo/a/ and the repo should be cloned from $url (to a/) when one clones the parent repo and runs git submodule init

- VMiklos

← back to recent threads