2

将存储库从 Git 转换为 Mercurial 会导致每条日志消息中出现大量虚假的“提交者:”行。我想不出一种不生成这些的方法。如果我转换 SVN 存储库,则不会添加这些行。它似乎只是一个 git 的东西。

这很容易测试。以下是在 Linux 上的方法:

mkdir repo && cd repo
git init
echo hello > foo.txt
git add foo.txt
git commit -m"Initial import"
cd ..
hg convert repo
cd repo-hg
hg log -v

日志会这样说:

changeset:   0:077135a87f99
tag:         tip
user:        Your Name <you@example.com>
date:        Mon Jan 01 12:04:46 2001 
files:       foo.txt
description:
Initial import

committer: Your Name <you@example.com>

那么,我怎样才能避免多余的“提交者:”行呢?

4

1 回答 1

5

这是特定于 git 的东西,hg convert 正在添加它,因为 hg 无法表示此信息。在 git 中,提交者和作者不必是同一个人(git,IMO 的真正伟大功能)。

似乎没有任何关于此的特定文档,并且它不是可配置的功能。我相信他们会高兴地接受补丁。:)

于 2009-04-30T17:22:46.073 回答