Jump to content

Fast Export failing to deal with non-english chars in branch names


cidico

Recommended Posts

For my issue, files that were UTF8, came out of Git Fast Export as escaped octal. e.g. c:/somewhere/\345\356\123\533\345\157.doc

I also reported the problems with escaped octals here: http://www.plasticscm.net/index.php?/topic/930-importing-tfs-project-into-plastic/page__st__20

I even made a perl-script for patching all the problems to make the git fast-export more Plastic friendly.

It would be preferred if the Plastic team patched the import tool though.

Known problems:

Special chars:

* Author and comitter encoded in utf-8, but git does not prepend the fast-export with a BOM.

* File names with special chars are octal escaped by git. I guess that the encoding is whatever encoding used by the committing file system, but I am not 100%.

Quotes:

* git does not quote paths in fast exports. This is a problem for bi-argument commands like "M" since paths with spaces are ambigious. What does "M aaa bbb ccc ddd" mean? Is it rename "aaa" to "bbb ccc ddd" or "aaa bbb" to "ccc ddd"?

However I found no cases in my repos where the quotes could not be trivially placed with some simple logic. Also, if an importer tracks the current state of the file system, it is trivial to place the quotes such that an existing file is matched in the first argument. My guess is that it is really rare cases where the ambiguous paths cannot be resolved with some trivial rules.

Mixed cases:

* if exporting to git from TFS, some paths representing the same file might have mixed cases due to a flaw in TFS.

The first name used when the file is first committed should take precedence unless the case is explicitly changed with an M command not moving the file to another path. If the M command is moving the file, the original cases of file and folder should be kept.

Since this is behavior might not be desired when importing repos from case sensitive sources, the case resolution should be optional.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...