mirror of
https://github.com/git/git
synced 2024-10-29 17:08:46 +00:00
git-svn: escape backslashes in refnames
This brings git-svn refname escaping up-to-date with
commit a4c2e69936
("Disallow '\' in ref names") from May 2009.
Reported-by: Michael Fladischer <michael@fladi.at>
Message-ID: <cb8cd9b1-9882-64d2-435d-40d0b2b82d59@fladi.at>
Signed-off-by: Eric Wong <e@80x24.org>
This commit is contained in:
parent
a274e0a036
commit
22af6fef9b
1 changed files with 1 additions and 1 deletions
|
@ -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*
|
||||
|
|
Loading…
Reference in a new issue