Skip to content

[Feature] Add command 'Change relative path' to Submodule context menu #1507

@goran-w

Description

@goran-w

When adding a submodule, we set its URL and its Relative Path. Ideally, we should also be able to change the URL (see #1506) and the Relative Path (see below) of an existing Submodule.

Suggestion: add a new context-menu command 'Change Relative Path' (or similar), using a dialog (similar to Add Submodule) for entering the new Relative Path (in a box pre-filled with the existing Relative Path).

It would then call git mv <old_rel_path> <new_rel_path> (which has extra support for correctly moving a submodule entry, since Git v2.9 / June 2016).

Both the special submodule directory-entry and the corresponding relative path in the .gitmodules file are updated by the above Git command, and these changes become Staged.

NOTE: The config "name" of the corresponding entry in .gitmodules is however NOT modified by the above Git command, since it's not strictly necessary for correct behavior. If needed, this can be done manually as a post-step (or it could potentially be added as an optional feature of this implementation)...

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions