]> git.proxmox.com Git - libgit2.git/commit
ignore: don't leak rules into higher directories
authorCarlos Martín Nieto <cmn@dwim.me>
Wed, 5 Nov 2014 15:51:39 +0000 (16:51 +0100)
committerCarlos Martín Nieto <cmn@dwim.me>
Thu, 6 Nov 2014 09:10:26 +0000 (10:10 +0100)
commit6069042fcbf7a555c344fa1f020fac9b72d27aad
tree3382a570a62fa8a3cb6bf7bcf78a7c1f9c0bfe71
parent0798b01400315db85715277d00f7a1262a5ed125
ignore: don't leak rules into higher directories

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.
src/attr_file.c
src/attr_file.h