Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [msysGit] Trailing spaces in branchname (git-svn)

From: Erik Faye-Lund <hidden>
Date: 2016-06-15 22:50:52

On Thu, Mar 24, 2011 at 9:16 PM, Barthus [off-list ref] 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help