Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e48dd86

Browse files
committed
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.
1 parent 1207b8f commit e48dd86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/submodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1647,7 +1647,7 @@ static int submodule_load_from_config(
16471647
} else {
16481648
khiter_t pos;
16491649
git_strmap *map = data->map;
1650-
pos = git_strmap_lookup_index(map, name.ptr);
1650+
pos = git_strmap_lookup_index(map, path ? path : name.ptr);
16511651
if (git_strmap_valid_index(map, pos)) {
16521652
sm = git_strmap_value_at(map, pos);
16531653
} else {

0 commit comments

Comments
 (0)