Skip to content

Commit 22af6fe

Browse files
author
Eric Wong
committed
git-svn: escape backslashes in refnames
This brings git-svn refname escaping up-to-date with commit a4c2e69 ("Disallow '\' in ref names") from May 2009. Reported-by: Michael Fladischer <[email protected]> Message-ID: <[email protected]> Signed-off-by: Eric Wong <[email protected]>
1 parent a274e0a commit 22af6fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

perl/Git/SVN.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ sub refname {
490490
#
491491
# Additionally, % must be escaped because it is used for escaping
492492
# and we want our escaped refname to be reversible
493-
$refname =~ s{([ \%~\^:\?\*\[\t])}{sprintf('%%%02X',ord($1))}eg;
493+
$refname =~ s{([ \%~\^:\?\*\[\t\\])}{sprintf('%%%02X',ord($1))}eg;
494494

495495
# no slash-separated component can begin with a dot .
496496
# /.* becomes /%2E*

0 commit comments

Comments
 (0)