Re: Submodule's .git file contains absolute path when created using 'git clone --recursive'
- From
- Ricardo Sánchez-Sáez <rsanchez.saez@gmail.com>
- Date
- Jul 12, 2016, 11:22 UTC
- Message-ID
- <loom.20160712T131832-33@post.gmane.org>
- In-Reply-To
- <CAGZ79kYjw6vzf7rf_-bOiMmm0VtAwO03vpk67QP4u2m_N_Mm4g@mail.gmail.com>
Stefan Beller <sbeller <at> google.com> writes:
Show 25 quoted lines
> > On Thu, May 5, 2016 at 12:20 PM, Loet Avramson <loet <at> forter.com> wrote: > > It happened on 2.8.1, also reproducible on 2.8.2. > > Haven't had the time to dive deeper into the code but my guess is that > > relative_path() returns different results in those 2 cases or maybe > > the way git-submodule.sh handles it. > > > > Then you found a new bug, congratulations. ;) > Thanks for reporting. > > The shell script uses relative_path() only for displaying paths, > not for writing them to the .git file. > > it really boils down to different environments > "git submodule update --init --recursive" is called from > (either manually or from `git clone`). > > Apart from that there are no immediate bells ringing, > are you doing any weird stuff with the file system (soft/hard > links) ? > > Thanks, > Stefan >
Hi,
sorry to awake an old thread. Has this been fixed? In which git version? It's hitting me on git version 2.7.4 (Apple Git-66) (default git client on OS X 10.11.5 (15F34)).
I think all submodule .git files should contain relative paths. Otherwise, duplicating or moving the cloned repository folder breaks the submodules.
Best, Ricardo