OSDN Git Service
(root)
/
git-core
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a274e0a
)
git-svn: escape backslashes in refnames
author
Eric Wong
<e@80x24.org>
Fri, 23 Dec 2016 01:14:01 +0000
(
01:14
+0000)
committer
Eric Wong
<e@80x24.org>
Fri, 23 Dec 2016 01:37:36 +0000
(
01:37
+0000)
This brings git-svn refname escaping up-to-date with
commit
a4c2e69936df8dd0b071b85664c6cc6a4870dd84
("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>
perl/Git/SVN.pm
patch
|
blob
|
history
diff --git
a/perl/Git/SVN.pm
b/perl/Git/SVN.pm
index
711d268
..
98518f4
100644
(file)
--- a/
perl/Git/SVN.pm
+++ b/
perl/Git/SVN.pm
@@
-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*