mirror of
https://github.com/ansible/ansible.git
synced 2026-07-28 16:15:12 +02:00
The git module hardcodes 'master' when comparing submodule versions
with track_submodules=yes. This fails for repositories that use a
different default branch (e.g. 'main').
Read the branch from .gitmodules for each submodule, falling back to
the remote HEAD if no branch is configured. This respects the
submodule's configured branch and works regardless of the default
branch name.
Fixes #77691
(cherry picked from commit 44aa5b8)
Signed-off-by: olegnazarov23 <olegnazarov23@users.noreply.github.com>
Co-authored-by: Oleg Nazarov <oleg@web-gravity.net>