Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git svn rebase index file open failed : Invalid argument

Tags:

git

git-svn

I use git-svn on windows for the first time , git svn rebase show error:

fatal: index file open failed: Invalid argument

Why it happened and how can i fix it ?

Thanks.

like image 579
meow Avatar asked Oct 22 '13 06:10

meow


1 Answers

If you are using msysgit on windows, there is a regression on msysgit1.8.4 for git-svn.
It seems to appear when executed in a CMD, not in a bash shell, so you can try that same command in a shell.

Or you can SubGit, which is much more complete and robust tool for transitionning from svn to git repo. Listen to his author at GitMinutes #22.


The regression is in progress to be fixed (currently -- October 2013 -- in the 'next' branch of the git repo) Bas Bossink confirms in the comments:

I just verified that it is fixed in git 1.8.5.2.msysgit.0

See commit 7fbd42, by jiangxin:

Tvangeste found that the "relative_path" function could not work properly on Windows if "in" and "prefix" have DOS drive prefix (such as "C:/windows"). ($gmane/234434)

E.g., When execute: test-path-utils, relative_path "C:/a/b" "D:/x/y" should return "C:/a/b", but returns "../../C:/a/b", which is wrong.

So make relative_path honor DOS drive prefix.

like image 188
VonC Avatar answered Oct 06 '22 01:10

VonC