Skip to content

pr-git-2509/kairosci/topic/status-submodule-url-sync-v3

tagged this 27 Nov 21:27
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 (2):
  submodule: prepare URL helpers for reuse
  status: warn about stale submodule URLs

 Documentation/git-status.adoc |   6 ++
 builtin/commit.c              |   1 +
 builtin/submodule--helper.c   |  63 +++---------------
 submodule.c                   |  45 +++++++++++++
 submodule.h                   |   3 +
 t/t7508-status.sh             |  84 ++++++++++++++++++++++++
 wt-status.c                   | 120 ++++++++++++++++++++++++++++++++++
 wt-status.h                   |   1 +
 8 files changed, 270 insertions(+), 53 deletions(-)

base-commit: acba8bf9753134d9bde89f94369f775838a8c5fe

Submitted-As: https://lore.kernel.org/git/pull.2509.v3.git.git.1795814853.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
Assets 2
Loading