Skip to content

Commit 4cebfac

Browse files
phillipwoodgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1d542a5 commit 4cebfac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

perl/Git.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1461,6 +1461,7 @@ when not using -z or when parsing the output of diff -u.
14611461

14621462
{
14631463
my %cquote_map = (
1464+
"a" => chr(7),
14641465
"b" => chr(8),
14651466
"t" => chr(9),
14661467
"n" => chr(10),
@@ -1487,7 +1488,7 @@ when not using -z or when parsing the output of diff -u.
14871488
$_ = $2;
14881489
last;
14891490
}
1490-
if (/^([\\\042btnvfr])(.*)$/) {
1491+
if (/^([\\\042abtnvfr])(.*)$/) {
14911492
$retval .= $cquote_map{$1};
14921493
$_ = $2;
14931494
last;

0 commit comments

Comments
 (0)