]> asedeno.scripts.mit.edu Git - git.git/blobdiff - git-svn.perl
Merge branch 'by/blame-doc-m-c'
[git.git] / git-svn.perl
index 74d86128ccb063d6aa7e6303a2c6c15739fde1e9..b3b6964f95976ba885a277de9d463a2443dd3147 100755 (executable)
@@ -2087,6 +2087,14 @@ sub refname {
        # .. becomes %2E%2E
        $refname =~ s{\.\.}{%2E%2E}g;
 
+       # trailing dots and .lock are not allowed
+       # .$ becomes %2E and .lock becomes %2Elock
+       $refname =~ s{\.(?=$|lock$)}{%2E};
+
+       # the sequence @{ is used to access the reflog
+       # @{ becomes %40{
+       $refname =~ s{\@\{}{%40\{}g;
+
        return $refname;
 }