author | Michael Haggerty <mhagger@alum.mit.edu> | |
Thu, 4 Aug 2011 04:47:46 +0000 (06:47 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 4 Aug 2011 22:57:18 +0000 (15:57 -0700) | ||
commit | f5114a40c0d0276ce6ff215a3dc51eb19da5b420 | |
tree | 7ef4ab2fd35855a58a76f296aa96e3001057321a | tree | snapshot |
parent | 0216af8356ef562147251c40fef72be25b8b9b07 | commit | diff |
git-check-attr: Normalize paths
Normalize the path arguments (relative to the working tree root, if
applicable) before looking up their attributes. This requires passing
the prefix down the call chain.
This fixes two test cases for different reasons:
* "unnormalized paths" is fixed because the .gitattribute-file-seeking
code is not confused into reading the top-level file twice.
* "relative paths" is fixed because the canonical pathnames are passed
to get_check_attr() or get_all_attrs(), allowing them to match the
pathname patterns as expected.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Normalize the path arguments (relative to the working tree root, if
applicable) before looking up their attributes. This requires passing
the prefix down the call chain.
This fixes two test cases for different reasons:
* "unnormalized paths" is fixed because the .gitattribute-file-seeking
code is not confused into reading the top-level file twice.
* "relative paths" is fixed because the canonical pathnames are passed
to get_check_attr() or get_all_attrs(), allowing them to match the
pathname patterns as expected.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/check-attr.c | diff | blob | history | |
t/t0003-attributes.sh | diff | blob | history |