Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCM: Differentiate between submodules and normal repos #43951

Open
firelizzard18 opened this issue Feb 18, 2018 · 11 comments
Open

SCM: Differentiate between submodules and normal repos #43951

firelizzard18 opened this issue Feb 18, 2018 · 11 comments
Assignees
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities scm General SCM compound issues
Milestone

Comments

@firelizzard18
Copy link

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 (f88bbf9, 2018-02-13T15:34:36.336Z)
OS version: Windows_NT x64 10.0.16299

@joaomoreno joaomoreno added this to the Backlog milestone Feb 19, 2018
@joaomoreno joaomoreno added feature-request Request for new features or functionality git GIT issues scm General SCM compound issues and removed new release labels Feb 19, 2018
@brian-pickens
Copy link

Plus one for me. When I work in the parent directory of all my git projects, it causes all of my submodules to display as many times as they are included within other projects. An option to not display submodules in the source control providers list would be helpful.

@joaomoreno joaomoreno added the help wanted Issues identified as good community contribution opportunities label Sep 14, 2018
@joaomoreno joaomoreno changed the title Differentiate between submodules and normal repos SCMDifferentiate between submodules and normal repos Sep 14, 2018
@joaomoreno joaomoreno changed the title SCMDifferentiate between submodules and normal repos SCM: Differentiate between submodules and normal repos Sep 14, 2018
@joaomoreno joaomoreno removed the git GIT issues label Sep 18, 2018
@joaomoreno joaomoreno removed their assignment Sep 18, 2018
@michael-letcher
Copy link

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

image

@joaomoreno joaomoreno changed the title SCM: Differentiate between submodules and normal repos SCM: Differentiate between repositories with the same name Aug 30, 2019
@joaomoreno joaomoreno self-assigned this Oct 9, 2019
@joaomoreno
Copy link
Member

#40548

@NotWearingPants
Copy link
Contributor

NotWearingPants commented 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

@firelizzard18
Copy link
Author

@joaomoreno I totally agree with @NotWearingPants. My issue is specifically related to submodules. #40548 would lessen the issue, but would not solve it.

@joaomoreno joaomoreno changed the title SCM: Differentiate between repositories with the same name SCM: Differentiate between submodules and normal repos May 26, 2020
@joaomoreno
Copy link
Member

You're absolutely right, sorry about that.

@joaomoreno joaomoreno reopened this May 26, 2020
@Awbmilne
Copy link

Awbmilne commented Jul 17, 2020

Duplicate of #101859 : PLEASE UPVOTE IT THERE SO IT CAN BE WORKED ON!

#101859 is Duplicate

@wolfsilver
Copy link

This extension can help solve this problem.

https://marketplace.visualstudio.com/items?itemName=R.git-submodule-sort

@lszomoru lszomoru assigned lszomoru and unassigned eamodio Oct 4, 2021
@jasonbeach
Copy link

In this same vein, I've started to use multiroot workspaces pretty extensively (they're awesome....I no longer need to have several vscode windows open). The projects I'm working on span a number of git repos and so I have a few top level folders that I've added to my workspace and underneath those I have all my repos placed. The Explorer view has a nice tree structure so this works out nice and makes it very easy to jump between repos. However, the source control tab doesn't show that structure--it flattens all the repos out (even repos that are submodules). Is there anyway to get the source control pane to follow the folder structure the repos are organized into?

@mjbogusz
Copy link

mjbogusz commented Nov 2, 2022

+1 on this. When working on a ROS workspace it's common to have multiple repos potentially with repeating submodules and the current view doesn't allow easy differentiating between them - see attached screenshot. The only way I've found is to hover the mouse over a repo's name, which displays it's full path.

Screenshot

image

@p-servus
Copy link

i also needs the fix for that .. if i have two subModules in this directories:

  • modules/vendorA/utils
  • modules/vendorB/utils
    .. then it will be displayed like this:
  • utils
  • utils

.. i can sort them by path (in my user settings.json):
"scm.repositories.sortOrder": "path",
.. but there is no option do display as path!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities scm General SCM compound issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.