]> git.proxmox.com Git - libgit2.git/commit
attr: less path mangling during attribute matching
authorEdward Thomson <ethomson@microsoft.com>
Tue, 12 May 2015 16:14:55 +0000 (12:14 -0400)
committerEdward Thomson <ethomson@microsoft.com>
Tue, 12 May 2015 20:22:31 +0000 (16:22 -0400)
commit90997e405d6bf7abb3f9ed336f5f99639d52a15e
tree25e6db293c86047d34fcea06d133deb0b44b3004
parent9465bedb097078355ea4131a839d15f242cd4652
attr: less path mangling during attribute matching

When handling attr matching, simply compare the directory path where the
attribute file resides to the path being matched.  Skip over commonality
to allow us to compare the contents of the attribute file to the remainder
of the path.

This allows us to more easily compare the pattern directly to the path,
instead of trying to guess whether we want to compare the path's basename
or the full path based on whether the match was inside a containing
directory or not.

This also allows us to do fewer translations on the pattern (trying to
re-prefix it.)
src/attr_file.c