git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
RERobert Ewald <robert.ewald@nov.com>
Date
Jul 26, 2007, 10:59 UTC
Message-ID
<f89uqv$tf2$1@sea.gmane.org>
In-Reply-To
<20070717131719.GB19724@piper.oerlikon.madduck.net>
Hello,
I am very interested in a functionality like this.
martin f krafft wrote:
Show 9 quoted lines
>> 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.
Show 17 quoted lines
>> > 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
Previous: martin f krafftNext: Martin F Krafft
Message 7 of 10 in “translate bad characters in refnames during git-svn fetch”
  1. translate bad characters in refnames during git-svn fetchmartin f krafft, Jul 15, 2007
  2. Eric WongJul 16, 2007
  3. Jan HudecJul 16, 2007
  4. martin f krafftJul 16, 2007
  5. Eric WongJul 17, 2007
  6. martin f krafftJul 17, 2007
  7. Robert EwaldJul 26, 2007
  8. Martin F KrafftJul 26, 2007
  9. Mike HommeyJul 28, 2007
  10. David KastrupJul 28, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.