Submodule options should be available in right-click menu

Bryce Schober 3 years ago updated 3 years ago 1

It seems to me that the submodule options found in the Remote > Submodule menu should also be available when right-clicking on the root of a specific submodule.

Do you mean all those commands?

The submodule entries in the Repositories view primarily represent the "repository root" aspect of the submodule, not the "submodule" aspect (relative to its parent directory). This aspect is represented by the submodule entries in the Files table. Hence, the majority of the submodule-related commands work on these Files table entries. Some of them also work on directories (which must not necessarily be submodule roots).

Using the Files table is a pretty awkward interface for us to access submodules, because our default mode of operation is to only ever show modified / unknown / non-ignored files, so the working copy state is always either obviously "clean" or "dirty."

Given that "best practice," I have to (1) expand the repositories view to my sub-directory (i.e. "external", because I don't want submodules cluttering my root directory), (2) select my sub-directory, then (3) use three more clicks to perform an operation on that submodule.

Maybe it makes sense to have a View-menu option to show/hide submodule entries in the file table regardless of their modified state? If unselected, hiding uninitialized submodules also could be possible - currently, they always show up.