git fast-import: Empty path component found in input

When you get “fatal: Empty path component found in input” errors from git fast-import, check that your export tool doesn’t write out path values that start with a slash. In my case, my rule file for svn-all-fast-export matched paths like “/project/trunk”, when I should’ve used “/project/trunk/” (note the trailing slash).

Pro-Tip for svn-all-fast-export: Use –metadata=no to get rid of the svn info in the generated git commits. It’s not really advertised as an option.

One thought on “git fast-import: Empty path component found in input

  1. Thanks a lot for this hint! I was wondering what was wrong and there you go, no slash at the end of the rule. They even write about that:

    All rules matching directories need to end with a ‘/’, else the tool will crash at some point. This is a known bug. The only exception are the rules using the recurse-action.

    I am wondering why not add a validation on the rules file, is this a feature or a bug? 🙂

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s