gav*_*koa 9 git mercurial bazaar
Bazaar支持添加元数据以承诺记录变更的实际作者与提交更改的人员的对比:
$ bzr commit --author "Jane Rey <jrey@example.com>" \
--author "John Doe <jdoe@example.com>"
添加此元数据后,可通过以下方式访问bzr log:
------------------------------------------------------------ revno: 105661 fixes bug(s): http://debbugs.gnu.org/9414 author: Oleksandr Gavenko committer: Juri Linkov branch nick: trunk timestamp: Mon 2011-09-05 12:55:11 +0300 message: * lisp/progmodes/grep.el (rgrep): Add "-type d".
可以在Mercurial/Git的提交中嵌入这样的元数据吗?
man*_*lds 10
在git中你有类似的命令:
git commit --author="Name <name@example.com>"
Run Code Online (Sandbox Code Playgroud)
但它通常来自预先设置的配置值.
Hg具有用于设置用户的类似标志,但不区分作者和提交者.但是有一个扩展来做到这一点.
git和hg都没有为提交设置多个作者的概念.虽然这通常是在团队中以某种预先确定的方式/约定在提交消息中完成的