jyknight / llvm-git-migration

7 stars 6 forks source link

header_kind == 'encoding' #3

Closed bjope closed 5 years ago

bjope commented 5 years ago

https://github.com/jyknight/llvm-git-migration/blob/e6a6e0a4818a0116d3cd6cfa72f6bdad4100cc1e/fast_filter_branch.py#L328

I tried the migration script on our out-of-tree llvm clone. Got some problems due to not handling header_kind == 'encoding' here.

I made a simple workaround locally to just do "pass" instead of raising the exception, just to be able to move forward with evaluation of the monorepo conversion. Not sure if that is an appropriate solution to incorporate here.

jyknight commented 5 years ago

It would be ideal to simply read the encoding line and pass it back through to the output. Unfortunately, git-fast-import only supports the default utf-8, and cannot specify an alternative encoding.

The encoding line only affects the commit message, which would be pretty easy to decode and re-encode into utf-8, if required. What encodings does your repository use?

bjope commented 5 years ago

Looks like there is a bunch of commits with iso8859-1 encoding in our repo.