diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2014-11-05 16:51:39 +0100 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-11-06 10:10:26 +0100 |
| commit | 6069042fcbf7a555c344fa1f020fac9b72d27aad (patch) | |
| tree | 3382a570a62fa8a3cb6bf7bcf78a7c1f9c0bfe71 /src/attr_file.h | |
| parent | 0798b01400315db85715277d00f7a1262a5ed125 (diff) | |
| download | libgit2-6069042fcbf7a555c344fa1f020fac9b72d27aad.tar.gz | |
ignore: don't leak rules into higher directoriescmn/stacked-ignore
A rule "src" in src/.gitignore must only match subdirectories of
src/. The current code does not include this context in the match rule
and would thus consider this rule to match the top-level src/ directory
instead of the intended src/src/.
Keep track fo the context in which the rule was defined so we can
perform a prefix match.
Diffstat (limited to 'src/attr_file.h')
| -rw-r--r-- | src/attr_file.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/attr_file.h b/src/attr_file.h index 87cde7e35..93de84d12 100644 --- a/src/attr_file.h +++ b/src/attr_file.h @@ -52,6 +52,8 @@ extern const char *git_attr__unset; typedef struct { char *pattern; size_t length; + char *containing_dir; + size_t containing_dir_length; unsigned int flags; } git_attr_fnmatch; |
