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>
This commit is contained in:

committed by
Eric Wong

parent
1174768b46
commit
73d419558d
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user