submodule: lookup the submodule by path if available

If we get the path from the gitmodules file, look up the submodule we're
interested in by path, rather then by name. Otherwise we might get
duplicate results.
This commit is contained in:
Carlos Martín Nieto 2015-07-11 18:31:28 +02:00
parent 1207b8f2a7
commit e48dd86eca

View File

@ -1647,7 +1647,7 @@ static int submodule_load_from_config(
} else {
khiter_t pos;
git_strmap *map = data->map;
pos = git_strmap_lookup_index(map, name.ptr);
pos = git_strmap_lookup_index(map, path ? path : name.ptr);
if (git_strmap_valid_index(map, pos)) {
sm = git_strmap_value_at(map, pos);
} else {