Some forms of authors don't round-trip

Issue #134 new
Mike Hommey
created an issue

See the following reduced testcase:

$ mkdir a b
$ cd b
$ git init --bare
$ cd ../a
$ hg init
$ echo a > a
$ hg commit -A -m a -u foo@bar
$ hg push ../b
$ cd ..
$ hg clone b c

The changeset in c doesn't have the same sha1 as the one in a because the author changed from foo@bar to foo@bar <foo@bar>. Reading the code, there are likely other forms that don't round-trip.

Comments (2)

  1. Danek Duvall

    Looks like this is related to a git restriction:

    $ GIT_AUTHOR_NAME="" GIT_AUTHOR_EMAIL=foo@bar git commit -m junk
    fatal: empty ident name (for <foo@bar>) not allowed

    In particular, the bogus address is fine, but the lack of a name is not.

    Perhaps hg-git, when pulling from a git repo, can detect that the name is the same as the email, and drop all but the email again.

  2. Log in to comment