{"thread":{"id":"9046","subject":"[PATCH] translate bad characters in refnames during git-svn fetch","startedAt":"2007-07-15T13:05:48Z","lastAt":"2007-07-28T07:33:51Z","messageCount":10,"participants":["martin f krafft","Eric Wong","Jan Hudec","Robert Ewald","Martin F Krafft","Mike Hommey","David Kastrup"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"47427","messageId":"20070715130548.GA6144@piper.oerlikon.madduck.net","threadId":"9046","inReplyTo":null,"subject":"[PATCH] translate bad characters in refnames during git-svn fetch","fromName":"martin f krafft","fromEmail":"madduck@madduck.net","sentAt":"2007-07-15T13:05:48Z","receivedAt":"2007-07-15T13:05:48Z","isPatch":true,"sender":{"key":"madduck@madduck.net","avatar":null},"body":"Hi,\n\nI am trying to track/convert the Debian pkg-mdadm repository with\ngit-svn:\n\n  svn://svn.debian.org/svn/pkg-mdadm/mdadm/trunk\n\nMy problem is that the fetching fails:\n\n  fatal: refs/remotes/tags/2.6.1-1~exp.1: cannot lock the ref\n  update-ref -m r311 refs/remotes/tags/2.6.1-1~exp.1\n  c6e351ea25dc90714048e33693099595c2d5dab8: command returned error:\n  128\n\nThis is because the ~ character is an invalid character for\na refname (it's used to specify the nth parent).\n\nSo I figured that the best way to deal with this is to introduce\na conversion filter to git-svn, but I cannot figure out where it has\nto go. My perl is rusty and even after an hour now with the code,\nI could not find the right spot.\n\nThe following patch works, but I can't really explain why. Moreover,\nit does not change the STDERR output, so you'll still get stuff like \n\n  r340 = 0dc5693471af9dfdb712c1342071ba1040af8963\n  (tags/2.6.1-1~exp.3)\n\nwhich makes me think that it's translating the refname too late.\nHowever, the end result looks sane.\n\nComments welcome,\nm\n\n---\ngit-check-ref-format(1) documents which characters may be contained in\na refname. Since Subversion has different rules, an import can result in\nproblems, such as:\n\n  fatal: refs/remotes/tags/2.6.1-1~exp.1: cannot lock the ref\n  update-ref -m r311 refs/remotes/tags/2.6.1-1~exp.1\n  c6e351ea25dc90714048e33693099595c2d5dab8: command returned error: 128\n\nThis patch translates bad characters to valid substitutes to enable imports of\ntags/branches/whatever using characters that git does not allow in refnames.\n\nSigned-off-by: martin f. krafft <madduck@piper.oerlikon.madduck.net>\n---\n git-svn.perl |   24 +++++++++++++++++++++++-\n 1 files changed, 23 insertions(+), 1 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 299b40f..de43697 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -1239,7 +1239,29 @@ sub new {\n \t$self;\n }\n \n-sub refname { \"refs/remotes/$_[0]->{ref_id}\" }\n+sub refname {\n+\tmy ($refname) = $_[0]->{ref_id};\n+\t## transform the refname as per rules in git-check-ref-format(1):\n+\t# no slash-separated omponent can begin with a dot .\n+\t# /.* becomes /,*\n+\t$refname =~ s|/\\.|/,|g;\n+\t# It cannot have two consecutive dots .. anywhere\n+\t# .. becomes ,,\n+\t$refname =~ s|\\.\\.|,,|g;\n+\t# It cannot have ASCII control character space, tilde ~, caret ^,\n+\t# colon :, question-mark ?, asterisk *, or open bracket[ anywhere\n+\t# <space> becomes _\n+\t# ~ becomes =\n+\t# ^ becomes @\n+\t# : becomes %\n+\t# ? becomes $\n+\t# * becomes +\n+\t# [ becomes (\n+\t$refname =~ y| ~^:?*[|_=@%\\$+(|;\n+\t# It cannot end with a slash /\n+\t$refname =~ s|/$||g;\n+\t\"refs/remotes/$refname\";\n+}\n \n sub svm_uuid {\n \tmy ($self) = @_;\n-- \n1.5.3.rc1.27.ga5e40\n\n\n-- \nmartin;              (greetings from the heart of the sun.)\n  \\____ echo mailto: !#^.\"<*>\"|tr \"<*> mailto:\" net@madduck\n \nspamtraps: madduck.bogus@madduck.net\n \n\"a warm bed in a house sounds a mite better\n than eating a hot dog on a stick\n with an old geezer traveling on a lawn mower.\"\n                                -- alvin straight (the straight story)\n"},{"id":"47502","messageId":"20070716033050.GA29521@muzzle","threadId":"9046","inReplyTo":"20070715130548.GA6144@piper.oerlikon.madduck.net","subject":"Re: [PATCH] translate bad characters in refnames during git-svn fetch","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-07-16T03:30:50Z","receivedAt":"2007-07-16T03:30:50Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"martin f krafft <madduck@madduck.net> wrote:\n> Hi,\n> \n> I am trying to track/convert the Debian pkg-mdadm repository with\n> git-svn:\n> \n>   svn://svn.debian.org/svn/pkg-mdadm/mdadm/trunk\n> \n> My problem is that the fetching fails:\n> \n>   fatal: refs/remotes/tags/2.6.1-1~exp.1: cannot lock the ref\n>   update-ref -m r311 refs/remotes/tags/2.6.1-1~exp.1\n>   c6e351ea25dc90714048e33693099595c2d5dab8: command returned error:\n>   128\n> \n> This is because the ~ character is an invalid character for\n> a refname (it's used to specify the nth parent).\n> \n> So I figured that the best way to deal with this is to introduce\n> a conversion filter to git-svn, but I cannot figure out where it has\n> to go. My perl is rusty and even after an hour now with the code,\n> I could not find the right spot.\n> \n> The following patch works, but I can't really explain why. Moreover,\n> it does not change the STDERR output, so you'll still get stuff like \n> \n>   r340 = 0dc5693471af9dfdb712c1342071ba1040af8963\n>   (tags/2.6.1-1~exp.3)\n> \n> which makes me think that it's translating the refname too late.\n> However, the end result looks sane.\n> \n> Comments welcome,\n\nThe major issue with this is that it doesn't handle odd cases\nwhere a refname is sanitized into something\n(say \"1234~2\" sanitizes to \"1234=2\"), and then another branch\nis created named \"1234=2\".\n\ngit-svn should at least keep track of what it got sanitized to, to\navoid clobbering branches.\n\nI started working on this a while back but haven't gotten around\nto revisiting it:\nhttp://thread.gmane.org/gmane.comp.version-control.git/45651\n\n> ---\n> git-check-ref-format(1) documents which characters may be contained in\n> a refname. Since Subversion has different rules, an import can result in\n> problems, such as:\n> \n>   fatal: refs/remotes/tags/2.6.1-1~exp.1: cannot lock the ref\n>   update-ref -m r311 refs/remotes/tags/2.6.1-1~exp.1\n>   c6e351ea25dc90714048e33693099595c2d5dab8: command returned error: 128\n> \n> This patch translates bad characters to valid substitutes to enable imports of\n> tags/branches/whatever using characters that git does not allow in refnames.\n> \n> Signed-off-by: martin f. krafft <madduck@piper.oerlikon.madduck.net>\n> ---\n>  git-svn.perl |   24 +++++++++++++++++++++++-\n>  1 files changed, 23 insertions(+), 1 deletions(-)\n> \n> diff --git a/git-svn.perl b/git-svn.perl\n> index 299b40f..de43697 100755\n> --- a/git-svn.perl\n> +++ b/git-svn.perl\n> @@ -1239,7 +1239,29 @@ sub new {\n>  \t$self;\n>  }\n>  \n> -sub refname { \"refs/remotes/$_[0]->{ref_id}\" }\n> +sub refname {\n> +\tmy ($refname) = $_[0]->{ref_id};\n> +\t## transform the refname as per rules in git-check-ref-format(1):\n> +\t# no slash-separated omponent can begin with a dot .\n> +\t# /.* becomes /,*\n> +\t$refname =~ s|/\\.|/,|g;\n> +\t# It cannot have two consecutive dots .. anywhere\n> +\t# .. becomes ,,\n> +\t$refname =~ s|\\.\\.|,,|g;\n> +\t# It cannot have ASCII control character space, tilde ~, caret ^,\n> +\t# colon :, question-mark ?, asterisk *, or open bracket[ anywhere\n> +\t# <space> becomes _\n> +\t# ~ becomes =\n> +\t# ^ becomes @\n> +\t# : becomes %\n> +\t# ? becomes $\n> +\t# * becomes +\n> +\t# [ becomes (\n> +\t$refname =~ y| ~^:?*[|_=@%\\$+(|;\n> +\t# It cannot end with a slash /\n> +\t$refname =~ s|/$||g;\n> +\t\"refs/remotes/$refname\";\n> +}\n>  \n>  sub svm_uuid {\n>  \tmy ($self) = @_;\n> -- \n\n-- \nEric Wong\n"},{"id":"47534","messageId":"20070716111509.GC18293@efreet.light.src","threadId":"9046","inReplyTo":"20070716033050.GA29521@muzzle","subject":"Re: [PATCH] translate bad characters in refnames during git-svn fetch","fromName":"Jan Hudec","fromEmail":"bulb@ucw.cz","sentAt":"2007-07-16T11:15:09Z","receivedAt":"2007-07-16T11:15:09Z","isPatch":true,"sender":{"key":"bulb@ucw.cz","avatar":null},"body":"On Sun, Jul 15, 2007 at 20:30:50 -0700, Eric Wong wrote:\n> The major issue with this is that it doesn't handle odd cases\n> where a refname is sanitized into something\n> (say \"1234~2\" sanitizes to \"1234=2\"), and then another branch\n> is created named \"1234=2\".\n> \n> git-svn should at least keep track of what it got sanitized to, to\n> avoid clobbering branches.\n> \n> I started working on this a while back but haven't gotten around\n> to revisiting it:\n> http://thread.gmane.org/gmane.comp.version-control.git/45651\n\nI believe % is safe, right? So what if git-svn just url-escaped stuff in the\nbranch name it does not like. Of course % would be included in the list of\ncharacters it does not like. Eg. 1234~2 would escape to 1234%7E2 and if the\nuser ever head 1234%7E2 in svn, it would simply escape too, to 1234%257E2.\n\nSpace is rather common, but that's why there is the + rule in url-encoding --\n\"foo bar\" escapes to \"foo+bar\" and \"foo+bar\" escapes to \"foo%2Bbar\". Or you\ncould use something else to escape space. I can only think of \"=\", \"_\" is too\ncommon to have it escaped and anything else would conflict with either git or\nshell.\n\n-- \n\t\t\t\t\t\t Jan 'Bulb' Hudec <bulb@ucw.cz>\n"},{"id":"47569","messageId":"20070716174731.GA4792@lapse.madduck.net","threadId":"9046","inReplyTo":"20070716111509.GC18293@efreet.light.src","subject":"Re: [PATCH] translate bad characters in refnames during git-svn fetch","fromName":"martin f krafft","fromEmail":"madduck@madduck.net","sentAt":"2007-07-16T17:47:31Z","receivedAt":"2007-07-16T17:47:31Z","isPatch":true,"sender":{"key":"madduck@madduck.net","avatar":null},"body":"also sprach Eric Wong <normalperson@yhbt.net> [2007.07.16.0530 +0200]:\n> The major issue with this is that it doesn't handle odd cases\n> where a refname is sanitized into something (say \"1234~2\"\n> sanitizes to \"1234=2\"), and then another branch is created named\n> \"1234=2\".\n\nWell, we can't please everyone, can we? :)\n\nI like Jan's proposal about using the % escape, even though it\ndoesn't make pretty branch names.\n\nOn the other hand, we could make the translation regexps\nconfigurable...\n\n-- \nmartin;              (greetings from the heart of the sun.)\n  \\____ echo mailto: !#^.\"<*>\"|tr \"<*> mailto:\" net@madduck\n \nspamtraps: madduck.bogus@madduck.net\n \n\"if they can get you asking the wrong questions,\n they don't have to worry about answers.\"\n                                                     -- thomas pynchon\n"},{"id":"47629","messageId":"20070717122852.GA21372@mayonaise","threadId":"9046","inReplyTo":"20070716174731.GA4792@lapse.madduck.net","subject":"Re: [PATCH] translate bad characters in refnames during git-svn fetch","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-07-17T12:28:52Z","receivedAt":"2007-07-17T12:28:52Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"martin f krafft <madduck@madduck.net> wrote:\n> also sprach Eric Wong <normalperson@yhbt.net> [2007.07.16.0530 +0200]:\n> > The major issue with this is that it doesn't handle odd cases\n> > where a refname is sanitized into something (say \"1234~2\"\n> > sanitizes to \"1234=2\"), and then another branch is created named\n> > \"1234=2\".\n> \n> Well, we can't please everyone, can we? :)\n> \n> I like Jan's proposal about using the % escape, even though it\n> doesn't make pretty branch names.\n\nI like it, too.  How about something like the two functions below?  This\nwill break things a bit for people currently using % in refnames,\nhowever.\n\nI think this will work rather nicely once I've figured out how the path\nglobbing code works[1] and where to sanitize/desanitize the refnames\nproperly.\n\nIt would be far easier to take your approach and sanitize them only\nfor the command-line, but storing unsanitized git refnames into the\n.git/config is something I want to avoid:\n\n  Somebody naming directories on the SVN side with the path component\n  \":refs/remotes\" in them could screw things up for us.\n\n# transform the refname as per rules in git-check-ref-format(1):\nsub sanitize_ref_name {\n\tmy ($refname) = @_;\n\n\t# It cannot end with a slash /, we'll throw up on this because\n\t# SVN can't have directories with a slash in their name, either:\n\tif ($refname =~ m{/$}) {\n\t\tdie \"ref: '$refname' ends with a trailing slash, this is \",\n\t\t    \"not permitted by git nor Subversion\\n\";\n\t}\n\n\t# It cannot have ASCII control character space, tilde ~, caret ^,\n\t# colon :, question-mark ?, asterisk *, or open bracket[ anywhere\n\t#\n\t# Additionally, % must be escaped because it is used for escaping\n\t# and we want our escaped refname to be reversible\n\t$refname =~ s{( \\%~\\^:\\?\\*\\[\\t)}{uc sprintf('%%%02x',ord($1))}eg;\n\n\t# no slash-separated component can begin with a dot .\n\t# /.* becomes /%2E*\n\t$refname =~ s{/\\.}{/%2E}g;\n\t# It cannot have two consecutive dots .. anywhere\n\t# .. becomes %2E%2E\n\t$refname =~ s{\\.\\.}{%2E%2E}g;\n\n\t$refname;\n}\n\nsub desanitize_ref_name {\n\tmy ($refname) = @_;\n\t$refname =~ s{%(?:([0-9A-F]{2})}{chr hex($1)}g;\n\n\t$refname;\n}\n\n> On the other hand, we could make the translation regexps\n> configurable...\n\nHopefully not needed.  I fear it would just add to confusion.\n\n\n[1] I don't remember writing the globbing code myself, maybe it was my\npsychotic alter ego, but I'm having trouble following it at this time of\nthe night/morning.\n\n-- \nEric Wong\n"},{"id":"47631","messageId":"20070717131719.GB19724@piper.oerlikon.madduck.net","threadId":"9046","inReplyTo":"20070717122852.GA21372@mayonaise","subject":"Re: [PATCH] translate bad characters in refnames during git-svn fetch","fromName":"martin f krafft","fromEmail":"madduck@madduck.net","sentAt":"2007-07-17T13:17:19Z","receivedAt":"2007-07-17T13:17:19Z","isPatch":true,"sender":{"key":"madduck@madduck.net","avatar":null},"body":"also sprach Eric Wong <normalperson@yhbt.net> [2007.07.17.1428 +0200]:\n> I like it, too.  How about something like the two functions below?\n> This will break things a bit for people currently using % in\n> refnames, however.\n\nWell, wait. git-svn usually works in its own repo, and if that's\ntracked by another repo, then it is tracked under the\nremote/whatever namespace, so there should not be any conflicts. You\nalso hardly ever run git-svn to clone stuff *into* an existing repo,\nso there can't be conflicts with existing refnames-with-%. Thus the\nonly breakage is if a person creates a new refname inside a git-svn\nrepo, which uses % in such a way as to collide with an imported\nbranch/tag/whatever from git-svn. That's not breakage, since git\nwill just refuse to do it.\n\nRemember that we're only translating from <char> -> %XX, never the\nother way around, really. Okay, we might be during git-svn\nrebase/dcommit, but only for those refnames which we store in\n.git/svn/ anyway. So a user-specified refname containing % will not\nbe a problem, will it?\n\n> I think this will work rather nicely once I've figured out how the path\n> globbing code works[1] and where to sanitize/desanitize the refnames\n> properly.\n\nI am glad you're having the same problem; makes me feel less stupid.\n:)\n\n>   Somebody naming directories on the SVN side with the path component\n>   \":refs/remotes\" in them could screw things up for us.\n\nThose people should be tarred and feathered. git owns the trademark\non these names.\n\n> sub desanitize_ref_name {\n> \tmy ($refname) = @_;\n> \t$refname =~ s{%(?:([0-9A-F]{2})}{chr hex($1)}g;\n> \n> \t$refname;\n> }\n\nWe could make it escape to %25; instead of %25. That's ugly but it\nwould make desanitation a little safer.\n\n> > On the other hand, we could make the translation regexps\n> > configurable...\n> \n> Hopefully not needed.  I fear it would just add to confusion.\n\nI was thinking about something like.\n\n  git-svn clone ...\n  ...\n  error: remote branch/tagn name includes ~, which git does not\n  allow. please specify a replacement character in .git/config\n\nand then have config.svn-remote.svn.translations simply be a list of\npairs in vim pairlist syntax:\n\n  ~:!,^:#,.:\\,\n\n-- \nmartin;              (greetings from the heart of the sun.)\n  \\____ echo mailto: !#^.\"<*>\"|tr \"<*> mailto:\" net@madduck\n \nspamtraps: madduck.bogus@madduck.net\n \n\"it is easier to be a lover than a husband for the simple reason\n that it is more difficult to be witty every day\n than to say pretty things from time to time.\"\n                                                   -- honoré de balzac\n"},{"id":"48693","messageId":"f89uqv$tf2$1@sea.gmane.org","threadId":"9046","inReplyTo":"20070717131719.GB19724@piper.oerlikon.madduck.net","subject":"Re: [PATCH] translate bad characters in refnames during git-svn fetch","fromName":"Robert Ewald","fromEmail":"robert.ewald@nov.com","sentAt":"2007-07-26T10:59:42Z","receivedAt":"2007-07-26T10:59:42Z","isPatch":true,"sender":{"key":"robert.ewald@nov.com","avatar":null},"body":"Hello,\n\nI am very interested in a functionality like this.\n\nmartin f krafft wrote:\n>> sub desanitize_ref_name {\n>> my ($refname) = @_;\n>> $refname =~ s{%(?:([0-9A-F]{2})}{chr hex($1)}g;\n>> \n>> $refname;\n>> }\n> \n> We could make it escape to %25; instead of %25. That's ugly but it\n> would make desanitation a little safer.\n\nIn my limited knowledge I wonder if that would confuse shell scripts.\n\n>> > On the other hand, we could make the translation regexps\n>> > configurable...\n>> \n>> Hopefully not needed.  I fear it would just add to confusion.\n> \n> I was thinking about something like.\n> \n>   git-svn clone ...\n>   ...\n>   error: remote branch/tagn name includes ~, which git does not\n>   allow. please specify a replacement character in .git/config\n> \n> and then have config.svn-remote.svn.translations simply be a list of\n> pairs in vim pairlist syntax:\n> \n>   ~:!,^:#,.:\\,\n> \n\nHaving the user specify replacements leads to diversion which would not be\ndesired. Consider the case where two git users clone a svn repo and later\npull from each other. Different replacements would cause confusion in this\ncase. That can of course be remedied by having the same replacements but\nthen configuration is not needed.\n\nIs there anybody working on this feature at the moment? Can I pull from\nsomewhere? I am hard pressed for that feature but my ability to contribute\nis only in testing and reporting bugs.\n\nGreetings\n-- \nRobert Ewald\n"},{"id":"48695","messageId":"20070726123519.GA8828@diamond.madduck.net","threadId":"9046","inReplyTo":"f89uqv$tf2$1@sea.gmane.org","subject":"Re: [PATCH] translate bad characters in refnames during git-svn fetch","fromName":"Martin F Krafft","fromEmail":"krafft@ailab.ch","sentAt":"2007-07-26T12:35:19Z","receivedAt":"2007-07-26T12:35:19Z","isPatch":true,"sender":{"key":"krafft@ailab.ch","avatar":null},"body":"also sprach Robert Ewald <robert.ewald@nov.com> [2007.07.26.1259 +0200]:\n> Is there anybody working on this feature at the moment? Can I pull\n> from somewhere? I am hard pressed for that feature but my ability\n> to contribute is only in testing and reporting bugs.\n\nAs I told you on IRC, I am on my way out for holiday but will read\nemail, so if you need non-urgent feedback, please write. Please\ninclude my name or reply to this thread for me to see it.\n\n-- \nMartin F. Krafft                Artificial Intelligence Laboratory\nPh.D. Student                   Department of Information Technology\nEmail: krafft@ailab.ch          University of Zurich\nTel: +41.(0)44.63-54323         Andreasstrasse 15, Office 2.18\nhttp://ailab.ch/people/krafft   CH-8050 Zurich, Switzerland\n \nSpamtraps: krafft.bogus@ailab.ch krafft.bogus@ifi.unizh.ch\n \ngentoo: the performance placebo.\n"},{"id":"48873","messageId":"loom.20070728T091909-416@post.gmane.org","threadId":"9046","inReplyTo":"20070717122852.GA21372@mayonaise","subject":"Re: [PATCH] translate bad characters in refnames during git-svn fetch","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2007-07-28T07:23:11Z","receivedAt":"2007-07-28T07:23:11Z","isPatch":true,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"Eric Wong <normalperson <at> yhbt.net> writes:\n> martin f krafft <madduck <at> madduck.net> wrote:\n> > also sprach Eric Wong <normalperson <at> yhbt.net> [2007.07.16.0530 +0200]:\n> > > The major issue with this is that it doesn't handle odd cases\n> > > where a refname is sanitized into something (say \"1234~2\"\n> > > sanitizes to \"1234=2\"), and then another branch is created named\n> > > \"1234=2\".\n> > \n> > Well, we can't please everyone, can we? :)\n> > \n> > I like Jan's proposal about using the % escape, even though it\n> > doesn't make pretty branch names.\n> \n> I like it, too.  How about something like the two functions below?  This\n> will break things a bit for people currently using % in refnames,\n> however.\n> \n> I think this will work rather nicely once I've figured out how the path\n> globbing code works[1] and where to sanitize/desanitize the refnames\n> properly.\n> \n> It would be far easier to take your approach and sanitize them only\n> for the command-line, but storing unsanitized git refnames into the\n> .git/config is something I want to avoid:\n> \n>   Somebody naming directories on the SVN side with the path component\n>   \":refs/remotes\" in them could screw things up for us.\n\nWhy not \"simply\" allow some form of escaping in refs, such that special\ncharacters CAN be used anywhere. Then git-svn would just have to escape these\ncharacters.\n\nSomething like:\ngit update-ref \"refs/remotes/tags/sometag\\~1\" $sha1\n\nI'm pretty sure that could help fix a lot of other similar issues.\n\nMike\n"},{"id":"48876","messageId":"85lkd13rts.fsf@lola.goethe.zz","threadId":"9046","inReplyTo":"loom.20070728T091909-416@post.gmane.org","subject":"Re: [PATCH] translate bad characters in refnames during git-svn fetch","fromName":"David Kastrup","fromEmail":"dak@gnu.org","sentAt":"2007-07-28T07:33:51Z","receivedAt":"2007-07-28T07:33:51Z","isPatch":true,"sender":{"key":"dak@gnu.org","avatar":"https://avatars.githubusercontent.com/u/52141349?v=4"},"body":"Mike Hommey <mh@glandium.org> writes:\n\n> Eric Wong <normalperson <at> yhbt.net> writes:\n>> \n>>   Somebody naming directories on the SVN side with the path component\n>>   \":refs/remotes\" in them could screw things up for us.\n>\n> Why not \"simply\" allow some form of escaping in refs, such that special\n> characters CAN be used anywhere. Then git-svn would just have to escape these\n> characters.\n>\n> Something like:\n> git update-ref \"refs/remotes/tags/sometag\\~1\" $sha1\n>\n> I'm pretty sure that could help fix a lot of other similar issues.\n\nWell, having had to do my fair level of porting shell-scripts and\ninstallation stuff and so on to Windows/MacOSX whatsoever where spaces\n(and other characters) in file names are considered business as usual:\nit is a bottomless pit.  You'll always find one more place in your\nsoftware that does not get this right.\n\nIt may be a more confined problem to make the interoperation utility\nresponsible for quoting/renaming.\n\n-- \nDavid Kastrup, Kriemhildstr. 15, 44793 Bochum\n"}]}