Search code examples
gitgit-svn

git svn rebase index file open failed : Invalid argument


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.


Solution

  • 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.