Re: Possible bug: Git submodules can get into broken state

2013-04-05 Thread Junio C Hamano
Chris Wilson writes: > They fixed it by checking in a rectified .gitmodules file. > > In the mean time, I ran git submodule init, and now I've ended up in a > situation where git submodule update doesn't work, and there's no > submodule command to fix it, so I have to remove the broken submodules

Re: Possible bug: Git submodules can get into broken state

2013-04-04 Thread Chris Wilson
On Thu, 4 Apr 2013, Junio C Hamano wrote: I do not want to write an awk/sed script to remove all the submodules from .git/config ... Don't do it then ;-) I think "git config" was added exactly because people wanted to customize their configuration from their scripts. OK, I didn't know about

Re: Possible bug: Git submodules can get into broken state

2013-04-04 Thread Junio C Hamano
Chris Wilson writes: > I do not want to write an > awk/sed script to remove all the submodules from .git/config ... Don't do it then ;-) I think "git config" was added exactly because people wanted to customize their configuration from their scripts. > I do, it seems bizarre that git submodul

Re: Possible bug: Git submodules can get into broken state

2013-04-04 Thread Chris Wilson
Hi Junio, On Thu, 4 Apr 2013, Junio C Hamano wrote: This state is broken (wrong URLs in .git/config), and AFAIK there's nothing you can do to check out these submodules without either: (a) manually hacking them out of .git/config, or I do not think updating the config is "hacking", but is a

Re: Possible bug: Git submodules can get into broken state

2013-04-04 Thread Jens Lehmann
Am 04.04.2013 19:10, schrieb Chris Wilson: > If your git repo's .gitmodules contains a URL that you don't have access to > (for example you download someone else's code and it references a submodule > using their writable g...@github.com URL) then: > > * git submodule init will add them to .git/

Re: Possible bug: Git submodules can get into broken state

2013-04-04 Thread Junio C Hamano
Chris Wilson writes: > If your git repo's .gitmodules contains a URL that you don't have > access to (for example you download someone else's code and it > references a submodule using their writable g...@github.com URL) then: > > * git submodule init will add them to .git/config, with the wrong

Possible bug: Git submodules can get into broken state

2013-04-04 Thread Chris Wilson
Hi all, If your git repo's .gitmodules contains a URL that you don't have access to (for example you download someone else's code and it references a submodule using their writable g...@github.com URL) then: * git submodule init will add them to .git/config, with the wrong URLs. * git submod