diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2015-07-01 21:15:06 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-07-01 21:15:06 +0200 |
commit | e0af3cb30c10f65f6db802f64a3389f73c0292b7 (patch) | |
tree | 63f0ef7c5afdd367a0a3a895a9821d399bbc6b8d | |
parent | e8e848a8dad92b6542b16449d29f4a5535fa7c5a (diff) | |
download | libgit2-e0af3cb30c10f65f6db802f64a3389f73c0292b7.tar.gz |
submodule: correctly delimit the keys to use for lookupcmn/submodule-duplicate
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.
-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 17e1a3561..fb3d4bf1e 100644 --- a/src/submodule.c +++ b/src/submodule.c @@ -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; |