Merge branch 'svn-escape-backslash' of git://bogomips.org/git-svn

* 'svn-escape-backslash' of git://bogomips.org/git-svn:
  git-svn: escape backslashes in refnames
This commit is contained in:
Junio C Hamano
2017-02-20 22:01:59 -08:00

View File

@ -490,7 +490,7 @@ sub refname {
# #
# Additionally, % must be escaped because it is used for escaping # Additionally, % must be escaped because it is used for escaping
# and we want our escaped refname to be reversible # 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 . # no slash-separated component can begin with a dot .
# /.* becomes /%2E* # /.* becomes /%2E*