[PATCH 2/4] Git::unquote_path() Handle '\a'
- From
- Phillip Wood <phillip.wood@talktalk.net>
- Date
- Jun 30, 2017, 09:49 UTC
- Message-ID
- <20170630094912.8653-3-phillip.wood@talktalk.net>
- In-Reply-To
- <20170630094912.8653-1-phillip.wood@talktalk.net>
From: Phillip Wood <phillip.wood@dunelm.org.uk>
The version copied from git-add--interactive did not handle quoted paths containing '\a'.
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> --- perl/Git.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/perl/Git.pm b/perl/Git.pm index 35188842ef82c67f83f6d72fd37e38edb895328b..f075b500c510d183074c0358fb24fefc72248125 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;
-- 2.13.1