Name |
Last commit
|
Last update |
---|---|---|
.. | ||
add.c | ||
escape.c | ||
init.c | ||
lookup.c | ||
modify.c | ||
nosubs.c | ||
open.c | ||
repository_init.c | ||
status.c | ||
submodule_helpers.c | ||
submodule_helpers.h | ||
update.c |
The test submodule::lookup::duplicated_path, which tries to verify that we detect submodules with duplicated paths, currently relies on the gitmodules file of "submod2_target". While this file has two gitmodules with the same path, one of these gitmodules has an empty name and thus does not pass `git_submodule_name_is_valid`. Because of this, the test is in fact dependent on the iteration order in which we process the submodules. In fact the "valid" submodule comes first, the "invalid" submodule will cause the desired error. In fact the "invalid" submodule comes first, it will be skipped due to its name being invalid, and we will not see the desired error. While this works on the master branch just right due to the refactoring of our config code, where iteration order is now deterministic, this breaks on all older maintenance branches. Fix the issue by simply using `cl_git_rewritefile` to rewrite the gitmodules file. This greatly simplifies the test and also makes the intentions of it much clearer.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
add.c | Loading commit data... | |
escape.c | Loading commit data... | |
init.c | Loading commit data... | |
lookup.c | Loading commit data... | |
modify.c | Loading commit data... | |
nosubs.c | Loading commit data... | |
open.c | Loading commit data... | |
repository_init.c | Loading commit data... | |
status.c | Loading commit data... | |
submodule_helpers.c | Loading commit data... | |
submodule_helpers.h | Loading commit data... | |
update.c | Loading commit data... |