summaryrefslogtreecommitdiff
path: root/t/t6013-rev-list-reverse-parents.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-03-28 17:49:13 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-03-28 21:47:06 -0700
commitdc09e9ec43c09cdf803cc4f39f1fcb8ebcf80eb1 (patch)
tree9a3b6c68d290e55349d1493f907b01d9969a4802 /t/t6013-rev-list-reverse-parents.sh
parentattr.c::path_matches(): the basename is part of the pathname (diff)
downloadtgif-dc09e9ec43c09cdf803cc4f39f1fcb8ebcf80eb1.tar.xz
attr.c::path_matches(): special case paths that end with a slash
The function is given a string that ends with a slash to signal that the path is a directory to make sure that a pattern that ends with a slash (i.e. MUSTBEDIR) can tell directories and non-directories apart. However, the pattern itself (pat->pattern and pat->patternlen) that came from such a MUSTBEDIR pattern is represented as a string that ends with a slash, but patternlen does not count that trailing slash. A MUSTBEDIR pattern "element/" is represented as a counted string <"element/", 7> and this must match match pathname "element/". Because match_basename() and match_pathname() want to see pathname "element" to match against the pattern <"element/", 7>, reduce the length of the path to exclude the trailing slash when calling these functions. Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6013-rev-list-reverse-parents.sh')
0 files changed, 0 insertions, 0 deletions