# Problem with submodules

5 messages from 2016-10-09 to 2016-10-10. Participants: venv21@gmail.com, Dennis Kaarsemaker, Stefan Beller.
Thread: https://gitlist.dev/t/44262

## venv21@gmail.com, 2016-10-09 14:41

Subject: Problem with submodules
Message-ID: <CAL4SumgJbrirymt5+iyNbpo++xXfzJZRiHDm8=0+eCArpCX=DA@mail.gmail.com>
URL: https://gitlist.dev/e/CAL4SumgJbrirymt5%2BiyNbpo%2B%2BxXfzJZRiHDm8%3D0%2BeCArpCX%3DDA%40mail.gmail.com

```
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, 2016-10-09 17:51

Subject: Re: Problem with submodules
Message-ID: <1476035501.26041.1.camel@kaarsemaker.net>
URL: https://gitlist.dev/e/1476035501.26041.1.camel%40kaarsemaker.net
In-Reply-To: <CAL4SumgJbrirymt5+iyNbpo++xXfzJZRiHDm8=0+eCArpCX=DA@mail.gmail.com>

```
On Sun, 2016-10-09 at 16:41 +0200, venv21@gmail.com wrote:
> 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, 2016-10-09 19:15

Subject: Re: Problem with submodules
Message-ID: <CAL4Sumj7r-RNXBi2Oh_=KAkcksM13sJjLzJEpszWXPXZ8hP6Kw@mail.gmail.com>
URL: https://gitlist.dev/e/CAL4Sumj7r-RNXBi2Oh_%3DKAkcksM13sJjLzJEpszWXPXZ8hP6Kw%40mail.gmail.com
In-Reply-To: <1476035501.26041.1.camel@kaarsemaker.net>

```
Sure, http://pastebin.com/bUFBDj0Q

```

## venv21@gmail.com, 2016-10-09 19:22

Subject: Re: Problem with submodules
Message-ID: <CAL4Sumjc0Fo3JLBZxdM50Z3o8ZhGk731905Gxg=R=GXsPMKzmA@mail.gmail.com>
URL: https://gitlist.dev/e/CAL4Sumjc0Fo3JLBZxdM50Z3o8ZhGk731905Gxg%3DR%3DGXsPMKzmA%40mail.gmail.com
In-Reply-To: <CAL4Sumj7r-RNXBi2Oh_=KAkcksM13sJjLzJEpszWXPXZ8hP6Kw@mail.gmail.com>

```
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, 2016-10-10 05:45

Subject: Re: Problem with submodules
Message-ID: <CAGZ79kYVr9NwAQzMb8Gxo9CO8PDpzPBX1PUka4BCDugFeQm7Fw@mail.gmail.com>
URL: https://gitlist.dev/e/CAGZ79kYVr9NwAQzMb8Gxo9CO8PDpzPBX1PUka4BCDugFeQm7Fw%40mail.gmail.com
In-Reply-To: <1476046602.26041.3.camel@kaarsemaker.net>

```
Adding the list back on.

On Sun, Oct 9, 2016 at 1:56 PM, Dennis Kaarsemaker
<dennis@kaarsemaker.net> wrote:
> 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.
>

```
