Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git svn clone fails with "Failed to strip path"

Tags:

git

git-svn

I am using git in a shop that is all Subversion. When I check out a repo using

git svn clone -s --preserve-empty-dirs https://<subversion-server>/svn/<repo> <folder-name>

All seems well as the cloning process begins, but at some point during the process, git fails with

Failed to strip path '<path-to-some-file>' ((?^:^trunk(/|$)))

Anyone know what's wrong or how to fix this?

like image 231
U007D Avatar asked Mar 04 '16 01:03

U007D


1 Answers

Searching the interwebs turned up both an explanation and advice on how to fix this (see step 4).

But the advice may be dated, as it did not work for my installation (git 2.7.0). But now knowing the issue, I was able to find the offending line and apply the suggested fix:

The fix was made by changing the offending line in usr/lib/perl5/vendor_perl/5.22/Git/SVN/Fetcher.pm, line 163:

Change die "Failed to strip path... to print "Failed to strip path... and all will be well.

I hope that helps someone else out there as well.

like image 64
U007D Avatar answered Oct 06 '22 01:10

U007D