The first patch i.e. prevent overwriting .gitmodules entry on path reuse is exactly the same The second patch however i.e. skip redundant active entries when pattern covers path has changed logic with the helper function being code maintainance because of the duplicated logic. I've tried to wrap it as much as possible to it's own core need without having to change it unless the core way of submodules addition and active status itself changes. The CI was tested in which the only compiler error I found was osx-gcc Which I suppose is already addressed, apart from this all of the other tests ran successfully which includes the t7413 (prvious 9) and the new one. K Jayatheerth (2): submodule: prevent overwriting .gitmodules entry on path reuse submodule: skip redundant active entries when pattern covers path builtin/submodule--helper.c | 60 +++++++++++++++++++++++++++------- t/t7400-submodule-basic.sh | 23 +++++++++++++ t/t7413-submodule-is-active.sh | 15 +++++++++ 3 files changed, 87 insertions(+), 11 deletions(-) -- 2.49.GIT