Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

Re: [PATCH] Let .git/config specify the url for submodules

From: Sven Verdoolaege <hidden>
Date: 2016-06-15 22:43:13

On Sat, Jun 02, 2007 at 09:13:55AM +0200, Lars Hjemli wrote:
Then Sven suggested to create a submodule section for the url, which would 
allow

 $ name=$(GIT_CONFIG=.gitmodules git-config path."$path".submodule)
 $ url=$(GIT_CONFIG=.gitmodules git-config submodule."$name".url)


But I don't see an easy way to do the mapping from path to url/submodule 
with:

[submodule "xyzzylib"]
 path=lib
 url=git://xyzzy/lib-1.2.3

Suggestions?
I'm not a shell programmer, but it could look something like this

    $ name=$(git config --get-regexp 'submodule\..*\.path' | while read module modulepath; do if test "$modulepath" = "$path"; then echo $module | sed -e 's/^submodule.//' -e 's/.path//'; fi; done)

skimo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help