question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SCM: Differentiate between submodules and normal repos

See original GitHub issue

Issue Type

Feature Request

I would like submodules to be nested underneath their parent repo in the Source Control Pane.

Description

I love the new submodule feature, but there are a couple of issues with the Source Control pane:

  • I can’t tell which providers (repos) are submodules
  • I can’t tell what top-level provider a given submodule provider is associated with

For most situations, this probably isn’t an issue. But for some of my projects, it is a serious issue. For example, I have projects:

  • A - depends on nothing
  • B - depends on A
  • C - depends on A and B
  • etc

For development, I use a multi-root workspace with a directory structure something like this:

  • Projects
    • A
    • B (references ../A)
    • C (references ../A and ../B)

For continuous integration and deployment, I use submodules:

  • C (references ./.libs/A and ./.libs/B)
    • .libs
      • A
      • B (references /builds/C/.libs/A)

While I could leave the submodules uninitialized on my dev machine, my workflow includes doing a build with submodules before I push, to ensure I haven’t forgotten to update a submodule, because why waste CPU cycles on a CI build that’s guaranteed to fail.

In this particular example, where B has A as a submodule, and C has A and B, I will have six repos (A, B, C, B/.libs/A, C/.libs/A, and C/.libs/B) show up in VSCode. While I can and do disable submodule discovery for these projects, that doesn’t stop VSCode from picking them up when I open a file in a submodule.

VS Code Info

VS Code version: Code 1.20.1 (f88bbf9137d24d36d968ea6b2911786bfe103002, 2018-02-13T15:34:36.336Z) OS version: Windows_NT x64 10.0.16299

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:31
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
michael-letchercommented, Apr 3, 2019

I have the same issue, which is worsened when using workspaces.

image

2reactions
NotWearingPantscommented, May 22, 2020

@joaomoreno This is not a duplicate of #40548

You are the one who changed the title in August from Differentiate between submodules and normal repos to Differentiate between repositories with the same name, which is not the same.

Please reopen and revert the title change, this is still an issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

SCM: Differentiate between submodules and normal repos · Issue ...
I would like submodules to be nested underneath their parent repo in the Source Control Pane. Description. I love the new submodule feature,...
Read more >
Git submodules vs Repo - MAB Labs, LLC
In this blog post, we will discuss two different tools to help us maintain multiple repositories that are part of a single project,...
Read more >
Git - Submodules - Git SCM
Git addresses this issue using submodules. Submodules allow you to keep a Git repository as a subdirectory of another Git repository. This lets...
Read more >
How to Utilize Submodules within Git Repos - Bits and Pieces
By default, submodules will add the subproject into a directory named the same as the repository. You can add a different path at...
Read more >
Any caveats to using many levels of repositories?
calbzam · A submodule can't be moved to a different repo. It stays on the repo where it was created. · A submodule...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found