From: Erik Faye-Lund Date: Thu, 24 Mar 2011 21:26:42 GMT Subject: Re: [msysGit] Trailing spaces in branchname (git-svn) Message-ID: In-Reply-To: <0014af8a-3b24-4398-88aa-7a3e460f2283@s11g2000yqh.googlegroups.com> On Thu, Mar 24, 2011 at 9:16 PM, Barthus wrote: > I am trying to clone a subversion repository that has a branchname > with a trailing space. Since I can't find a solution I downloaded the > code to try to understand the problem. Since I am not familiar with > perl it is a bit hard for me. This is what I have found out so far: > > In git-svn.perl: > tmp_index_do is called and tries to create the folder with the > trailing space (under svn/refs/remotes) with the following line of > code: > mkpath([$dir]) unless -d $dir; > reading the solution above, I figured that I should be able to > "sanitize" the path -reusing som code already existing in the script: >        sub refname > I then tried to: > git svn fetch > > Now the folder gets created, but then some lockfile is supposed to be > created (with the trailing space in the path), and it fails again. > > I have not been able to locate the call that tries to create the > lockfile (yet), and I guess there will be more fileoperations made to > the folder. If I manage to figure out the code my theory now is to > "sanitize" the branchname in the structure where it is contained when > it comes from subversion (possibly adding a "sanitized" storage to not > destroy the original name if it is needed), and see if the clone/fetch > can continue. > > My hope is though, that someone who understands this maybe can fix it, > or maybe point me in the right direction. This kind of question is usually better to ask on the main Git mailing list, as it's not really Windows specific.