]> git.ipfire.org Git - thirdparty/git.git/commit
Merge branch 'js/submodule-fix-misuse-of-path-and-name'
authorJunio C Hamano <gitster@pobox.com>
Fri, 13 Oct 2023 21:18:28 +0000 (14:18 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 13 Oct 2023 21:18:28 +0000 (14:18 -0700)
commitb32f5b6b34a2062e94d546c923e3bcb97aba4a16
tree0309b79ae4eef4900ac13a54ea4620ef410dd91b
parenta45eddec40b7fd0b9a86ccd0e889a785829d55d7
parentbd1c20ccd70d7452566bbc56ca2cf1fbb73d747c
Merge branch 'js/submodule-fix-misuse-of-path-and-name'

In .gitmodules files, submodules are keyed by their names, and the
path to the submodule whose name is $name is specified by the
submodule.$name.path variable.  There were a few codepaths that
mixed the name and path up when consulting the submodule database,
which have been corrected.  It took long for these bugs to be found
as the name of a submodule initially is the same as its path, and
the problem does not surface until it is moved to a different path,
which apparently happens very rarely.

* js/submodule-fix-misuse-of-path-and-name:
  t7420: test that we correctly handle renamed submodules
  t7419: test that we correctly handle renamed submodules
  t7419, t7420: use test_cmp_config instead of grepping .gitmodules
  t7419: actually test the branch switching
  submodule--helper: return error from set-url when modifying failed
  submodule--helper: use submodule_from_path in set-{url,branch}