Merge branch 'svn-escape-backslash' of git://bogomips.org/git-svn
authorJunio C Hamano <gitster@pobox.com>
Tue, 21 Feb 2017 06:01:59 +0000 (22:01 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 21 Feb 2017 06:01:59 +0000 (22:01 -0800)
* 'svn-escape-backslash' of git://bogomips.org/git-svn:
git-svn: escape backslashes in refnames

perl/Git/SVN.pm
index 711d2687a3005091d80fc964e5fd92aba6167b38..98518f4ddb4c031417e313dcf4daaa68e9955be0 100644 (file)
@@ -490,7 +490,7 @@ sub refname {
        #
        # Additionally, % must be escaped because it is used for escaping
        # and we want our escaped refname to be reversible
-       $refname =~ s{([ \%~\^:\?\*\[\t])}{sprintf('%%%02X',ord($1))}eg;
+       $refname =~ s{([ \%~\^:\?\*\[\t\\])}{sprintf('%%%02X',ord($1))}eg;
 
        # no slash-separated component can begin with a dot .
        # /.* becomes /%2E*