Bug in handling $ character in GIT SVN

From: Sergiy Barlabanov <hidden>
Date: 2016-06-15 23:06:30

Hi,

I was redirected here from Git-users list (https://groups.google.com/forum/#!topic/git-users/mftroAtEfvE).

We have recently a problem my dcommiting renamed files containing $ character in their names. GIT SVN crashed with the error:

Assertion failed: (svn_uri_is_canonical(child_uri, NULL)), function uri_skip_ancestor, file /SourceCache/subversion/subversion-62/subversion/subversion/libsvn_subr/dirent_uri.c, line 1519.
error: git-svn died of signal 6

Environment was Mac OS X 10.8.5, Git version 1.8.5.2, SVN version 1.7.10.

After having googled a little bit I found out that the error was in Editor.pm script in the way how it handles special characters. There was a patch fixing the problem (see http://git.661346.n2.nabble.com/PATCH-git-svn-do-not-escape-certain-characters-in-paths-td7575413.html). But the patch does not seem to be consistent. It does not work if a file name contains $. Having looked at the source file (https://github.com/git/git/blob/master/perl/Git/SVN/Editor.pm) and played with the local copy of Editor.pm I found out that $ sign must be escaped in the perl regex expression used in Editor.pm:148. Otherwise $ is not caught by the expression and get replaced with %24 which is not accepted by the SVN client.

Seems to be bug and it should be still present because $ sign is still unescaped in the latest master of GIT - see https://github.com/git/git/blob/master/perl/Git/SVN/Editor.pm:148.

Best regards,
Sergiy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help