diff options
| author | Torsten Schmutzler <git-ts@theblacksun.eu> | 2010-05-06 22:20:43 +0200 |
|---|---|---|
| committer | Eric Wong <normalperson@yhbt.net> | 2010-05-09 01:25:19 -0700 |
| commit | 73d419558d9fa4de3be28bd58158636bc739808e (patch) | |
| tree | 6ae114aeb4340195d457f6aa52978ceec3e1618a /git-svn.perl | |
| parent | git-svn: Remove unused use of File::Temp (diff) | |
| download | git-73d419558d9fa4de3be28bd58158636bc739808e.tar.gz git-73d419558d9fa4de3be28bd58158636bc739808e.zip | |
git-svn: mangle refnames forbidden in git
git-check-ref-format(1) describes names which
cannot be used as refnames for git. Some are
legal branchnames in subversion however.
Mangle the not yet handled cases.
Signed-off-by: Torsten Schmutzler <git-ts@theblacksun.eu>
Acked-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 'git-svn.perl')
| -rwxr-xr-x | git-svn.perl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/git-svn.perl b/git-svn.perl index 74d86128cc..b3b6964f95 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -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; } |
