gpt4 book ai didi

git - 如果日志中没有额外的 "committer:"行,我如何才能转换为 Mercurial?

转载 作者:太空狗 更新时间:2023-10-29 14:34:58 26 4
gpt4 key购买 nike

将存储库从 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>

那么,我怎样才能避免出现多余的“committer:”行呢?

最佳答案

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

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

关于git - 如果日志中没有额外的 "committer:"行,我如何才能转换为 Mercurial?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/806209/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com