threads / discuss / 44262

Problem with submodules

Subject: Problem with submodules

## tl;dr

5 messages between Oct 9, 2016 and Oct 10, 2016.

replies: 4people: 3as markdown or json

venv21@gmail.com· Oct 9, 2016, 14:41 UTC · lore
Hi, I want to report a regression.

After cloning for example https://git.gnome.org/browse/epiphany with git 2.10 and running ./autogen.sh I get the following errors: http://pastebin.com/93AunRhu

The developer told me that it is probably not an issue caused by epiphany and I should try an older git version. I installed 2.7.2 and it works perfectly. So I think theres a bug in git 2.10.

Thanks and regards
Dennis Kaarsemaker· Oct 9, 2016, 17:51 UTC · re: venv21@gmail.com · lore

Re: Problem with submodules

On Sun, 2016-10-09 at 16:41 +0200, venv21@gmail.com wrote:
Show 9 quoted lines
> Hi, I want to report a regression.
> 
> After cloning for example https://git.gnome.org/browse/epiphany with
> git 2.10 and running ./autogen.sh I get the following errors:
> http://pastebin.com/93AunRhu
> 
> The developer told me that it is probably not an issue caused by
> epiphany and I should try an older git version. I installed 2.7.2 and
> it works perfectly. So I think theres a bug in git 2.10.
I can't reproduce the problem with git 2.10.1
Can you share the .git/config file in your clone of epiphany please.
D.
venv21@gmail.com· Oct 9, 2016, 19:22 UTC · re: venv21@gmail.com · lore

Re: Problem with submodules

hm okay, it works with 2.10.0, when I remove the word 'epiphany' from the urls in line 13 and 15

2016-10-09 21:15 GMT+02:00 venv21@gmail.com <venv21@gmail.com>:
> Sure, http://pastebin.com/bUFBDj0Q
Stefan Beller· Oct 10, 2016, 05:45 UTC · lore

Re: Problem with submodules

Adding the list back on.

On Sun, Oct 9, 2016 at 1:56 PM, Dennis Kaarsemaker <dennis@kaarsemaker.net> wrote:

Show 35 quoted lines
> On Sun, 2016-10-09 at 21:15 +0200, venv21@gmail.com wrote:
>> Sure, http://pastebin.com/bUFBDj0Q
>
> So you actually cloned from a path ending in epihany/, not epiphany.
> Turns out the trainling slash matters when using relative urls for
> submodules:
>
> $ cat test.sh
> url=http://remote.example/repo
>
> for url in $url "$url/"; do
>     echo "Remote: $url"
>     rm -rf main
>     git init -q main
>     (
>         cd main
>         git remote add origin $url
>         git init -q sub
>         git -C sub commit --allow-empty -mtest
>         printf '[submodule "sub"]\n\tpath = sub\n\t\turl = ../sub\n' > .gitmodules
>         git add sub .gitmodules
>         git commit -mtest
>         git submodule init
>     ) >/dev/null
> done
>
> $ sh test.sh
> Remote: http://remote.example/repo
> Submodule 'sub' (http://remote.example/sub) registered for path 'sub'
> Remote: http://remote.example/repo/
> Submodule 'sub' (http://remote.example/repo/sub) registered for path 'sub'
>
> I don't know whether this is a bug or a feature. I find using relative
> paths for submodules a pretty dodgy idea anyway and would fix up the
> .gitmodules file.

I disagree here, IMHO relative path/urls are better than absolute URLs as it allows to hand over a project to a different organisation that wants to have its own fork including submodule changes just easily (no need to muck around the submodule config, "it just works" ;)

>
> Stefan, is it possible that this is a regression in the C rewrite?
Totally possible!
Thanks for the regression test, I'll dive into the code tomorrow.

Thanks, Stefan

>
> D.
>

← back to recent threads