Repository navigation
pr-git-2509/kairosci/topic/status-submodule-url-sync-v4
tagged this
28 Nov 16:53
When a submodule URL changes in .gitmodules, the corresponding URL in the superproject's .git/config may keep pointing at the old location. This series makes git status warn about that mismatch and suggest git submodule sync. The warning resolves relative URLs as git submodule sync does. It also suppresses the warning when the populated submodule has a custom remote URL that a sync would overwrite. The series is split into: 1. submodule: move URL helpers to submodule.c 2. submodule: make URL resolution repository-aware 3. status: warn about stale submodule URLs Changes since v2: * Keep the helper relocation in a preparatory commit. * Move repository-aware URL resolution into its own commit. * Keep test output inside its fixture directory. Closes gitgitgadget/git#565 Alessio Attilio (3): submodule: move URL helpers into submodule.c submodule: make URL resolution repository-aware status: report when submodule URLs are out of sync Documentation/git-status.adoc | 12 ++++ builtin/commit.c | 1 + builtin/submodule--helper.c | 60 ++--------------- submodule.c | 45 +++++++++++++ submodule.h | 12 ++++ t/t7508-status.sh | 100 ++++++++++++++++++++++++++++ wt-status.c | 120 ++++++++++++++++++++++++++++++++++ wt-status.h | 1 + 8 files changed, 298 insertions(+), 53 deletions(-) base-commit: acba8bf9753134d9bde89f94369f775838a8c5fe Submitted-As: https://lore.kernel.org/git/pull.2509.v4.git.git.1795884822.gitgitgadget@gmail.com In-Reply-To: https://lore.kernel.org/git/pull.2509.git.git.1795774880142.gitgitgadget@gmail.com In-Reply-To: https://lore.kernel.org/git/pull.2509.v2.git.git.1795796162.gitgitgadget@gmail.com In-Reply-To: https://lore.kernel.org/git/pull.2509.v3.git.git.1795814853.gitgitgadget@gmail.com