The difference between author and committer ?

3,109 views
Skip to first unread message

paymaster

unread,
Apr 18, 2011, 9:54:41 PM4/18/11
to Repo and Gerrit Discussion
hi
what is the difference between author and committer ?

is it same meaning? i'm confused....

Manuel Doninger

unread,
Apr 19, 2011, 1:22:46 AM4/19/11
to paymaster, Repo and Gerrit Discussion
The author is the one who did the code change. The committer is the
person who committed that change to a repository.
Example: I'm not a committer in the EGit project, so i have no rights
to push directly to the EGit repository at Eclipse. But i contribute
to EGit, so my changes have the author set to my name and email. If my
change gets reviewed by the EGit team, and submitted, the committer
field contains the name and email of the person who submitted the
change (for example Matthias Sohn or Chris Aniszczyk, who are
committer in the EGit project).

Regards,
Manuel

> --
> To unsubscribe, email repo-discuss...@googlegroups.com
> More info at http://groups.google.com/group/repo-discuss?hl=en
>

Magnus Bäck

unread,
Apr 19, 2011, 2:10:38 AM4/19/11
to Repo and Gerrit Discussion
On Tuesday, April 19, 2011 at 07:22 CEST,
Manuel Doninger <man...@doninger.net> wrote:

> On Tue, Apr 19, 2011 at 03:54, paymaster <baeks...@gmail.com> wrote:
>
> > what is the difference between author and committer ?
> >
> > is it same meaning? i'm confused....
>

> The author is the one who did the code change. The committer is
> the person who committed that change to a repository.
> Example: I'm not a committer in the EGit project, so i have no
> rights to push directly to the EGit repository at Eclipse. But
> i contribute to EGit, so my changes have the author set to my
> name and email. If my change gets reviewed by the EGit team,
> and submitted, the committer field contains the name and email
> of the person who submitted the change (for example Matthias
> Sohn or Chris Aniszczyk, who are committer in the EGit project).

Just to be clear, the above is certainly true for projects where
you send patches via email and maintainers apply them with "git
am". For Gerrit-based projects this isn't necessarily true as the
original commit created by the contributor may certainly end up
on the official branch.

If a maintainer submits the actual commit that a contributor has
created (if the submit strategy is Fast-forward only or Merge if
necessary) the contributor will still be the committer. However,
if the contributor e.g. rebases the change or by any other means
create a new commit object, then whoever does that will be the
committer.

Pro Git (http://progit.org/book/ch2-3.html) puts it like this:

The author is the person who originally wrote the work,
whereas the committer is the person who last applied the work.
So, if you send in a patch to a project and one of the core
members applies the patch, both of you get credit --- you as
the author and the core member as the committer.

(This is really more a Git question than a Repo/Gerrit one.)

--
Magnus Bäck Opinions are my own and do not necessarily
SW Configuration Manager represent the ones of my employer, etc.
Sony Ericsson

Reply all
Reply to author
Forward
0 new messages