Thread (6 messages) 6 messages, 5 authors, 2016-06-15

Re: [PATCH] translate bad characters in refnames during git-svn fetch

From: Robert Ewald <hidden>
Date: 2016-06-15 22:43:24

Hello,

I am very interested in a functionality like this.

martin f krafft wrote:
quoted
sub desanitize_ref_name {
my ($refname) = @_;
$refname =~ s{%(?:([0-9A-F]{2})}{chr hex($1)}g;

$refname;
}
We could make it escape to %25; instead of %25. That's ugly but it
would make desanitation a little safer.
In my limited knowledge I wonder if that would confuse shell scripts.
quoted
quoted
On the other hand, we could make the translation regexps
configurable...
Hopefully not needed.  I fear it would just add to confusion.
I was thinking about something like.

  git-svn clone ...
  ...
  error: remote branch/tagn name includes ~, which git does not
  allow. please specify a replacement character in .git/config

and then have config.svn-remote.svn.translations simply be a list of
pairs in vim pairlist syntax:

  ~:!,^:#,.:\,
Having the user specify replacements leads to diversion which would not be
desired. Consider the case where two git users clone a svn repo and later
pull from each other. Different replacements would cause confusion in this
case. That can of course be remedied by having the same replacements but
then configuration is not needed.

Is there anybody working on this feature at the moment? Can I pull from
somewhere? I am hard pressed for that feature but my ability to contribute
is only in testing and reporting bugs.

Greetings
-- 
Robert Ewald
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help