git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Relative url values in .gitmodules confusingly sensitive to clone via ssh vs https.

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Mar 23, 2020, 01:11 UTC
Message-ID
<20200323011117.GC6499@camp.crustytoothpaste.net>
In-Reply-To
<CAAjm7Ga5JOJ2w=01o1-x-80HMGVaYQQy8SBBb-zJ6MOQAe4SxQ@mail.gmail.com>
On 2020-03-17 at 18:34:09, Benjamin Shropshire wrote:
Show 17 quoted lines
> From my perspective, this is a bug.
> 
> If I clone a repo twice like this:
> 
> git clone https://github.com/user/repo.git ./https
> git clone git@github.com:user/repo.git ./ssh
> 
> And if it contains a .gitmodules like this:
> 
> [submodule "x"]
>     path = xxx
>     url = ../../different-user/something.git
> 
> When I `git submodule update --init --recursive` in each, only the
> HTTPS version works. the SSH version confusingly seems to try to find
> something at ~/different-user/something.git or some other path in the
> local file system.

What version of Git are you using? This works fine for me on a recent next. In addition, I see we have tests for this in t0060, and adding an additional case for this appears to pass.

-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
Previous: brian m. carlsonNext: Benjamin Shropshire
Message 5 of 7 in “Relative url values in .gitmodules confusingly sensitive to clone via ssh vs https.”
  1. Benjamin ShropshireMar 17, 2020
  2. brian m. carlsonMar 18, 2020
  3. Benjamin ShropshireMar 18, 2020
  4. brian m. carlsonMar 20, 2020
  5. brian m. carlsonMar 23, 2020
  6. Benjamin ShropshireMar 23, 2020
  7. brian m. carlsonMar 23, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.