Ticket #5351 (new defect)

Opened 10 months ago

Last modified 7 months ago

Incorrect author in timeline and log - GitPlugin shows committer instead of author

Reported by: egagnon@j-meg.com Assigned to: hvr
Priority: normal Component: GitPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

When the author differs from the committer, GitPlugin seems to favor the committer over the author as "Trac Author". This has impact in the timeline, log, and various other locations.

GitPlugin seems to have this concept of "Trac Author" in addition to "git-author" and "git-committer", as can be seen on: http://sablecc.org/changeset/1a3b6173986aa9cfc694acba0ecbbb7e40028f22

There might be reasons why a project would like to show the committer name, instead of the author name, in the timeline and log to show committer activity. Yet, other projects might have very few, or even a single committer in their official repository, as encouraged by Git. In such a case, it might make more sense to show the real author name in the timeline and log.

I suggest using a configuration flag to chose which of the git-author or git-committer to use as "Trac Author", so that everybody is pleased.

Attachments

pass_repo.patch (3.4 kB) - added by roadrunner on 08/17/09 10:32:20.
A small preparatory change
trac_author.patch (2.5 kB) - added by roadrunner on 08/17/09 10:33:01.
Add trac_author config option

Change History

08/17/09 10:31:12 changed by roadrunner

I'm attaching two patches that provide a configuration option for this. The first patch just sets up a couple things (and is identical to the first patch for #2685); the second is the main change, and provides a trac_author config option which defaults to 'committer' (i.e. the original behaviour).

08/17/09 10:32:20 changed by roadrunner

  • attachment pass_repo.patch added.

A small preparatory change

08/17/09 10:33:01 changed by roadrunner

  • attachment trac_author.patch added.

Add trac_author config option

(follow-up: ↓ 3 ) 08/18/09 15:18:30 changed by anonymous

Thanks!

How should I go about testing this? I currently use "apt-get trac-git" on Debian.

(in reply to: ↑ 2 ) 08/20/09 05:24:44 changed by roadrunner

Replying to anonymous:

How should I go about testing this? I currently use "apt-get trac-git" on Debian.

I don't know what that exactly installs (just the egg, or the expanded egg?). But you can check out the plugin from subversion or grab the zipped source for the plugin (see the links on the GitPlugin page), and then do something like

cd gitplugin/0.11
patch -p2 < .../pass_repo.patch
patch -p2 < .../trac_author.patch
easy_install .

This may overwrite the installed git-plugin files from you Debian package (and in fact you probably want to remove the Debian package first to avoid conflicts and confusion).


Add/Change #5351 (Incorrect author in timeline and log - GitPlugin shows committer instead of author)




Change Properties
Action