Re: Submodule's .git file contains absolute path when created using 'git clone --recursive'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 5, 2016 at 5:51 AM, Loet Avramson <loet@xxxxxxxxxx> wrote:
> Hi,
>
> According to git-clone man page - running 'git clone --recursive' "...is
> equivalent to running 'git submodule update --init --recursive' immediately
> after the clone is finished...", though I found a little difference between
> the two regarding the submodule's .git file:
>
> 1. Running 'git clone' and 'git submodule update --init --recursive'
> separately will create the .git file in each submodule containing a relative
> path to the superproject's .git directory as expected.
>
> 2. Running 'git clone --recursive' will create the .git file containing an
> *absolute* path to the superproject's .git directory. (as it was expected
> using git versions 1.7.8 - 1.7.10 as far as I understand)
>
> Not sure if that's a bug but it got stuff behaving really weird in a specific
> usecase on one of our environments. It would be highly appreciated to update
> the docs at least.

Which version of Git are you using?

See[1] for how clone handles submodules. (It's a call to submodule
update --init --recursive)

There was a bug with recursive submodules in the 2.7 time frame and
that got fixed in [2].

So could you make sure your version of Git contains these fixes?



[1] https://kernel.googlesource.com/pub/scm/git/git/+/master/builtin/clone.c#734
[2] https://kernel.googlesource.com/pub/scm/git/git/+/7307dd898988c79fc687051e783b3cac8488a559
specially https://kernel.googlesource.com/pub/scm/git/git/+/f8eaa0ba98b3bd9cb9035eba184a2d9806d30b27



>
> Thanks.
>
>  -Loet
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]