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 <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Phillip Wood committed
Jun 30, 2017 at 10:49 UTC
4cebfac94412ccbd077c6776f7c8db1914bafde2
1 file changed
+2
-1
perl/Git.pm
+2
-1
@@ -1461,6 +1461,7 @@ when not using -z or when parsing the output of diff -u.
1461
1462
{
1463
my %cquote_map = (
1464
+ "a" => chr(7),
1465
"b" => chr(8),
1466
"t" => chr(9),
1467
"n" => chr(10),
@@ -1487,7 +1488,7 @@ when not using -z or when parsing the output of diff -u.
1488
$_ = $2;
1489
last;
1490
}
1490
- if (/^([\\\042btnvfr])(.*)$/) {
1491
+ if (/^([\\\042abtnvfr])(.*)$/) {
1492
$retval .= $cquote_map{$1};
1493
$_ = $2;
1494
last;