Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible and how "Giving credit for a change" for Mercurial/Git as in Bazaar?

Bazaar support adding meta data to commit to record who the actual author of a change is vs. the person who commits the change:

  $ bzr commit --author "Jane Rey <[email protected]>" \
               --author "John Doe <[email protected]>"

After adding this meta data it accessible via bzr log, like:

------------------------------------------------------------
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".

It is possible embed such metadata in commit for Mercurial/Git?

like image 948
gavenkoa Avatar asked Oct 22 '11 00:10

gavenkoa


2 Answers

In git you have the similar command:

git commit --author="Name <[email protected]>"

But it usually comes from pre-set config values.

Hg has a similar flag for setting the user, but does not make a distinction between author and committer. But there is an extension to do that.

Both git and hg do not have the concept of setting multiple authors for a commit. Though that is usually done in the commit message in some pre-determined way / convention in the team

like image 136
manojlds Avatar answered Sep 25 '22 13:09

manojlds


Mercurial has no such ability by default. There is no way to specify a "committer" vs an "author" directly. Similarly there is support for only one author.

like image 21
sylvanaar Avatar answered Sep 25 '22 13:09

sylvanaar