mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-07 20:17:59 +00:00
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:
parent
a34c4f8dce
commit
08c2d3e97c
@ -1647,7 +1647,7 @@ static int submodule_load_from_config(
|
|||||||
} else {
|
} else {
|
||||||
khiter_t pos;
|
khiter_t pos;
|
||||||
git_strmap *map = data->map;
|
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)) {
|
if (git_strmap_valid_index(map, pos)) {
|
||||||
sm = git_strmap_value_at(map, pos);
|
sm = git_strmap_value_at(map, pos);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user