From: Phillip Wood Date: Fri, 30 Jun 2017 09:49:10 +0000 (+0100) Subject: Git::unquote_path(): handle '\a' X-Git-Tag: v2.14.0-rc0~22^2~2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=4cebfac94412ccbd077c6776f7c8db1914bafde2;p=git-core%2Fgit.git Git::unquote_path(): handle '\a' unquote_path() does not handle quoted paths containing '\a', even though quote.c::unquote_c_style() does, and quote.c:sq_lookup[] tells quote.c::sq_must_quote() that '\007' must be quoted as '\a'. Signed-off-by: Phillip Wood Signed-off-by: Junio C Hamano --- diff --git a/perl/Git.pm b/perl/Git.pm index cf7a7e6a5..3179e6efb 100644 --- a/perl/Git.pm +++ b/perl/Git.pm @@ -1461,6 +1461,7 @@ when not using -z or when parsing the output of diff -u. { my %cquote_map = ( + "a" => chr(7), "b" => chr(8), "t" => chr(9), "n" => chr(10), @@ -1487,7 +1488,7 @@ when not using -z or when parsing the output of diff -u. $_ = $2; last; } - if (/^([\\\042btnvfr])(.*)$/) { + if (/^([\\\042abtnvfr])(.*)$/) { $retval .= $cquote_map{$1}; $_ = $2; last;