Skip to content

File+Folder status from inside submodule should reflect the submodule state, not the root repository #6

@DefaultRyan

Description

@DefaultRyan

Clone https://github.com/microsoft/PowerToys and init the submodules. Navigate into one of the submodule folders, say cziplib, and see that the status bar is still showing the status of the root repository, instead of the submodule itself.

Image

In this screenshot, we see Branch: main. Instead we should see the status of the submodule, which in this case, is detached instead of on a branch. So it should be something like Detached: 7a57414. Or, to distinguish this as a submodule status, perhaps (submodule) Detached: 7a57414.

This also goes for modifications done inside a submodule. Let's add an untracked file to the submodule.

Image

In this screenshot, we can see the root repo status showing ~1 because the submodule is dirty. This is correct for the root repo, but the submodule state is missing. Inside the submodule, in addition to the detached status covered above, we should instead see +1 instead of ~1 because of the new untracked file, and the new file's status should read untracked.

In both of these cases, we should provide information similar to what is obtained from the command line git status when run from inside the submodule folder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions