On 5 December 2017 at 03:41, Martin Dias <[email protected]> wrote:
> I suspect it's related to the large number of commits in my repo. I made
> some tweaks and succeeded to create the fast-import file. But I get:
>
> fatal: Unsupported command: .
> fast-import: dumping crash report to .git/fast_import_crash_10301
>
> Do you recognize this error?
> I will check my changes tweaking the git-migration tool to see if I modified
> some behavior my mistake...

I had the same error just last night.

In my case, it turned out to be a non-UTF8 encoded character in one of
the commit messages.

I tracked it down by looking at the crash report and searching for a
nearby command.  I've deleted the crash reports now, but I think it
was the number associated with a mark command that got me near the
problem character in the fast-import file.

I also modified the code to halt whenever it found a non-UTF8
character.  I'm sure there are better ways to do this, but:


GitMigrationCommitInfo>>inlineDataFor: aString

    | theString |
    theString := aString.
    "Ensure the message has valid UTF-8 encoding (this will raise an
error if it doesn't)"
    [ (ZnCharacterEncoder newForEncoding: 'utf8') decodeBytes: aString
asByteArray ]
        on: Error
        do: [ :ex | self halt: 'Illegal string encoding'.
            theString := aString select: [ :each | each asciiValue
between: 32 and: 128 ] ].
    ^ 'data ' , theString size asString , String cr , (theString
ifEmpty: [ '' ] ifNotEmpty: [ theString , String cr ])



Cheers,
Alistair

Reply via email to