mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-08 03:15:46 +00:00
submodule: correctly delimit the keys to use for lookup
The regex we use to look at the gitmodules file does not correctly delimit the name of submodule which we want to look up and puts '.*' straight after the name, maching on any submodule which has the seeked submodule as a prefix of its name. Add the missing '\.' in the regex so we want a full stop to exist both before and after the submodule name.
This commit is contained in:
parent
e8e848a8da
commit
e0af3cb30c
@ -1385,7 +1385,7 @@ int git_submodule_reload(git_submodule *sm, int force)
|
||||
|
||||
git_buf_sets(&path, "submodule\\.");
|
||||
git_buf_text_puts_escape_regex(&path, sm->name);
|
||||
git_buf_puts(&path, ".*");
|
||||
git_buf_puts(&path, "\\..*");
|
||||
|
||||
if (git_buf_oom(&path)) {
|
||||
error = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user