Subject: Re: [PATCH] Add 'git fast-export', the sister of 'git fast-import'

From: "Shawn O. Pearce" <[email-masked]>
Date: Mon, 26 Nov 2007 21:08:43 -0500

Johannes Schindelin <[email-masked]> wrote:
> This program dumps (parts of) a git repository in the format that
> fast-import understands.
...
> +-------------------------------------------------------------------
> +$ git fast-export --all | (cd /empty/repository && git fast-import)
> +-------------------------------------------------------------------
> +
> +This will export the whole repository and import it into the existing
> +empty repository.  Except for reencoding commits that are not in
> +UTF-8, it would be a one-to-one mirror.

WTF?

Why are you reencoding the commits on output in fast-export?
Why aren't you dumping them raw to the stream?  fast-import takes
them raw.  Oh, it doesn't have a way to set the encoding header.
DOH.

I think this should be prefixed by fast-import patch to teach it
something like "encoding N" as a subcommand of commit, so that you
can feed data in a non UTF-8 encoding and get it to include the
proper encoding header in the commit object it creates.  That way
a pipeline like the above really does create a duplicate repository,
with the same commit SHA-1s, even if the commits weren't in UTF-8.

-- 
Shawn.