diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2015-07-11 18:31:28 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-07-11 18:31:28 +0200 |
commit | 08c2d3e97c0ee45222b93c214d0b752d0c52ee2d (patch) | |
tree | 36269e37ab015ec6fbc3b006bbe92b2a180b3ff3 | |
parent | a34c4f8dcee7e985444be9f5e02b627a55c16bbb (diff) | |
download | libgit2-08c2d3e97c0ee45222b93c214d0b752d0c52ee2d.tar.gz |
submodule: lookup the submodule by path if availablecmn/submodule-foreach-diff-path
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.
-rw-r--r-- | src/submodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/submodule.c b/src/submodule.c index fb3d4bf1e..892c98304 100644 --- a/src/submodule.c +++ b/src/submodule.c @@ -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 { |