Skip to content

Support '[email protected]:{user}/{repo}.git' format for '.gitmodules' #8018

@axonasif

Description

@axonasif

Is your feature request related to a problem? Please describe

There are conflicts when both HTTP and SSH URL format is used in .gitmodules1
If you open this repo on gitpod, you will notice that for some reason the HTTP one got its files wiped out, this doesn't happen when all of the submodules have HTTP based URLs and everything is just fine.

Upon manual submodule sync attempt, you will see this error as expected:
Screenshot 2022-02-03 at 11 46 36 PM

Describe the behaviour you'd like

Describe alternatives you've considered

Maybe we could show an error on detecting SSH format on .gitmodules and suggest to auto-rewrite for the user?

Additional context

#7950 is a similar issue but it does not address this, so created this issue 😄
Also, see relevant discussion on discord2

Footnotes

  1. https://github.com/contentlayerdev/contentlayer/blob/c8c78232b629603f244d400fe8e7f02ba372bc9b/.gitmodules

  2. https://discord.com/channels/816244985187008514/816246578594840586/938082102455468042
    cc @schickling

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions