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

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

From
Erik Faye-Lund <kusmabite@gmail.com>
Date
Mar 24, 2011, 21:26 UTC
Message-ID
<AANLkTinZnd0R8Rnv4kaiJAGP0qKEwgbU+nP=donmbEbp@mail.gmail.com>
In-Reply-To
<0014af8a-3b24-4398-88aa-7a3e460f2283@s11g2000yqh.googlegroups.com>
On Thu, Mar 24, 2011 at 9:16 PM, Barthus <magnus.kallstrom@gmail.com> wrote:
Show 29 quoted lines
> 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.

Next: Erik Faye-Lund
Message 1 of 5 in “Re: [msysGit] Trailing spaces in branchname (git-svn)”
  1. Erik Faye-LundMar 24, 2011
  2. Erik Faye-LundJun 15, 2011
  3. Erik Faye-LundJun 15, 2011
  4. Magnus KallströmJun 15, 2011
  5. Magnus KallströmJun 21, 2011

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.