# Bug in handling $ character in GIT SVN

1 messages from 2015-09-10 to 2015-09-10. Participants: Sergiy Barlabanov.
Thread: https://gitlist.dev/t/40317

## Sergiy Barlabanov, 2015-09-10 15:22

Subject: Bug in handling $ character in GIT SVN
Message-ID: <753DB529-B81D-45A4-B339-03E0FCE4DCE2@sergiy-barlabanov.de>
URL: https://gitlist.dev/e/753DB529-B81D-45A4-B339-03E0FCE4DCE2%40sergiy-barlabanov.de

```
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
```
