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>
This commit is contained in:
Phillip Wood 2017-06-30 10:49:10 +01:00 committed by Junio C Hamano
parent 1d542a5487
commit 4cebfac944

View file

@ -1461,6 +1461,7 @@ sub prefix_lines {
{
my %cquote_map = (
"a" => chr(7),
"b" => chr(8),
"t" => chr(9),
"n" => chr(10),
@ -1487,7 +1488,7 @@ sub prefix_lines {
$_ = $2;
last;
}
if (/^([\\\042btnvfr])(.*)$/) {
if (/^([\\\042abtnvfr])(.*)$/) {
$retval .= $cquote_map{$1};
$_ = $2;
last;