bRad Gibson bRad Gibson - 7 months ago 58
Git Question

git svn clone fails with "Failed to strip path"

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?


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/, 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.