When a submodule URL changes in .gitmodules, the URL cached in the superproject's .git/config can keep pointing at the old remote. Alessio Attilio's series, sent through GitGitGadget, makes git status warn about that mismatch and suggest git submodule sync. It resolves relative URLs the way git submodule sync does. It stays quiet when a populated submodule has a custom remote URL that a sync would overwrite.

The cover letter describes three patches: moving the URL helpers to submodule.c, making URL resolution repository-aware, and the status warning. Junio Hamano pointed out that the posted series has only two patches, with the first both relocating the helpers and taking a repository argument. He asked whether it had been sent before the work was finished. Alessio's follow-up message describes the check as comparing three URLs: the .gitmodules URL resolved against the superproject's default remote, the cached submodule.<name>.url, and the submodule's default remote URL.

Junio's review of the status patch raised several points. The check at the top of wt_status_check_submodule_urls() had been replaced, though he thought it had been agreed to move that check into the caller, wt_status_print(). He also saw what he called a glaring bug in the updated --ignore-submodules logic, and he asked for the get_value() config readers to be replaced by the get_string() family. He said the problems he saw in an earlier round were much improved.

On the helper-extraction patch, Junio noted that the new code calls repo_default_remote() before returning early for non-relative URLs, which wastes work. He also noted that the xgetcwd() fallback is safe for current callers such as submodule--helper and git status. He said the preparatory split made the series easier to read, and the thread records a similar comment from D. Ben Knoble.

Alessio replied that he will explain in the commit message why three URLs are compared, when the warning triggers and which status formats emit it. He will move repo_default_remote() below the early return and switch to the get_string helpers so strcmp() never receives NULL. He also agreed that already-resolved values were being resolved a second time, which gives wrong paths when the superproject's own remote is relative. He plans to resolve the raw .gitmodules URL and prepend up_path instead. A new version is expected.