Debian Bug report logs - #451880
git-core: Git should support multiple authors for a commit

version graph

Package: git; Maintainer for git is Gerrit Pape <pape@smarden.org>; Source for git is src:git.

Reported by: Josh Triplett <josh@joshtriplett.org>

Date: Mon, 19 Nov 2007 06:03:11 UTC

Severity: wishlist

Tags: upstream

Found in versions git/1:1.7.1-1, git-core/1:1.5.3.5-1

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, josh@freedesktop.org, Gerrit Pape <pape@smarden.org>:
Bug#451880; Package git-core. Full text and rfc822 format available.

Acknowledgement sent to Josh Triplett <josh@freedesktop.org>:
New Bug report received and forwarded. Copy sent to josh@freedesktop.org, Gerrit Pape <pape@smarden.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Josh Triplett <josh@freedesktop.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: git-core: Git should support multiple authors for a commit
Date: Sun, 18 Nov 2007 19:08:28 -0800
Package: git-core
Version: 1:1.5.3.5-1
Severity: wishlist

I fairly often work on a commit with other people, and I want the
commit metadata to reflect that by showing multiple authors for one
commit.  Multiple people can sign off on one commit, but when such a
patch merges upstream you cannot distinguish that from a chain of
signoffs.  Furthermore, I want something machine-readable and
consistent, like the current metadata.

RFCs 822 and 2822 allow mail messages to contain multiple addresses in
the From field, which suitably describes a message with multiple
authors.  (In such messages, the Sender field must describe who
actually sent the mail.)  Based on this, I would like Git to do the
following:

* When applying patches from mails with multiple From addresses,
  generate a commit with multiple authors.

* When formatting a patch from a commit with multiple authors,
  generate a mail with multiple From addresses, and use the current
  Git identity as the Sender.  (Actually, generating the Sender field
  using the current identity potentially makes sense regardless, if
  not the same as the committer.)

* Let me specify a commit with multiple authors via git-commit, such
  as by specifying multiple --author options.

I think the primary issue here lies with backward compatibility in the
format of a commit object.  I *think* some extensibility exists there,
sufficient to implement this.

- Josh Triplett

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.22-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages git-core depends on:
ii  cpio                    2.9-6            GNU cpio -- a program to manage ar
ii  libc6                   2.6.1-6          GNU C Library: Shared libraries
ii  libcurl3-gnutls         7.17.1-1         Multi-protocol file transfer libra
ii  libdigest-sha1-perl     2.11-2           NIST SHA-1 message digest algorith
ii  liberror-perl           0.15-8           Perl module for error/exception ha
ii  libexpat1               1.95.8-4         XML parsing C library - runtime li
ii  perl-modules            5.8.8-12         Core Perl modules
ii  zlib1g                  1:1.2.3.3.dfsg-7 compression library - runtime

Versions of packages git-core recommends:
ii  curl                          7.17.1-1   Get a file from an HTTP, HTTPS or 
pn  git-doc                       <none>     (no description available)
ii  less                          409-1      Pager program similar to more
ii  openssh-client [ssh-client]   1:4.6p1-6  secure shell client, an rlogin/rsh
ii  patch                         2.5.9-4    Apply a diff file to an original
ii  rsync                         2.6.9-5    fast remote file copy program (lik

-- no debconf information




Changed Bug submitter from Josh Triplett <josh@freedesktop.org> to Josh Triplett <josh@joshtriplett.org>. Request was from Josh Triplett <josh@joshtriplett.org> to control@bugs.debian.org. (Sat, 04 Jul 2009 09:51:52 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#451880; Package git-core. (Sun, 16 May 2010 03:09:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Sun, 16 May 2010 03:09:03 GMT) Full text and rfc822 format available.

Message #12 received at 451880@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Josh Triplett <josh@freedesktop.org>
Cc: 451880@bugs.debian.org
Subject: Re: Git should support multiple authors for a commit
Date: Sat, 15 May 2010 22:05:14 -0500
reassign 451880 git git-core/1:1.5.3.5-1
found 451880 git/1:1.7.1-1
tags 451880 + upstream
quit

Hi Josh,

Josh Triplett wrote[1]:

> I fairly often work on a commit with other people, and I want the
> commit metadata to reflect that by showing multiple authors for one
> commit.

This has come up a few times recently[2][3][4], with the best workaround
suggested being Andreas’s

  Co-authored-by: Some One <some.one@example.foo>

As you mentioned, emails are allowed to have multiple authors, and
there is no reason in principle some faraway future git version could
not similarly handle them:

 1. Teach _everyone_ who parses git objects (in git.git and elsewhere)
    to process ‘coauthor’ lines after the committer line.  Unlike
    the ‘author’ line, these would not have a date attached.

 2. Teach ‘git fsck’ (and hence index-pack, etc) to warn about them but
    not error out.

 3. Add a configuration variable to allow git to produce
    multiple-author commits.  Such commits would make the repository
    unusable by versions of git without (1) and (2), so probably nobody
    would want to enable this for a while.

Sounds doable but a lot of trouble.  Maybe Nicolas Pitre or Shawn Pearce
could say more if you want to pursue this.

Alternatively, maybe format-patch, fast-import/fast-export, and am
should cheat by processing Co-authored-by lines at the top of the final
paragraph of the commit message themselves.

BTW, thanks for all your work on git.  Your bug reports are a lot of
fun to read.

What do you think?
Jonathan

[1] http://bugs.debian.org/451880
[2] http://thread.gmane.org/gmane.comp.version-control.git/83880
[3] http://thread.gmane.org/gmane.comp.version-control.git/146086/focus=146223
[4] http://thread.gmane.org/gmane.comp.version-control.git/146886




Bug reassigned from package 'git-core' to 'git'. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Sun, 16 May 2010 03:09:05 GMT) Full text and rfc822 format available.

Bug No longer marked as found in versions git-core/1:1.5.3.5-1. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Sun, 16 May 2010 03:09:05 GMT) Full text and rfc822 format available.

Bug Marked as found in versions git-core/1:1.5.3.5-1. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Sun, 16 May 2010 03:09:06 GMT) Full text and rfc822 format available.

Bug Marked as found in versions git/1:1.7.1-1. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Sun, 16 May 2010 03:09:06 GMT) Full text and rfc822 format available.

Added tag(s) upstream. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Sun, 16 May 2010 03:09:06 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#451880; Package git. (Mon, 17 May 2010 19:33:12 GMT) Full text and rfc822 format available.

Acknowledgement sent to Josh Triplett <josh@joshtriplett.org>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Mon, 17 May 2010 19:33:12 GMT) Full text and rfc822 format available.

Message #27 received at 451880@bugs.debian.org (full text, mbox):

From: Josh Triplett <josh@joshtriplett.org>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: 451880@bugs.debian.org
Subject: Re: Git should support multiple authors for a commit
Date: Mon, 17 May 2010 12:32:18 -0700
On Sat, May 15, 2010 at 10:05:14PM -0500, Jonathan Nieder wrote:
> Josh Triplett wrote[1]:
> > I fairly often work on a commit with other people, and I want the
> > commit metadata to reflect that by showing multiple authors for one
> > commit.
> 
> This has come up a few times recently[2][3][4], with the best workaround
> suggested being Andreas’s
> 
>   Co-authored-by: Some One <some.one@example.foo>

I do something similar; all my pair-programmed commits have a note at
the end of the commit message saying
Commit by Josh Triplett and Jamey Sharp.

I'd just like git to have real metadata for this case.

> As you mentioned, emails are allowed to have multiple authors, and
> there is no reason in principle some faraway future git version could
> not similarly handle them:
> 
>  1. Teach _everyone_ who parses git objects (in git.git and elsewhere)
>     to process ‘coauthor’ lines after the committer line.  Unlike
>     the ‘author’ line, these would not have a date attached.

I'd suggest just using multiple "author" lines for this, for two
reasons:

- Some tools might already handle this in a sensible way without
  breaking.  For instance, git show and git log seem to do the right
  thing already.

- It seems odd to have one author listed as "author" and others as
  "coauthor".

Also, I don't see any reason not to have the date attached to each
author; it can contain the same date, or under some circumstances it
might make sense for it to contain a different date.  And that way,
tools designed to parse "author" will not need to allow for the lack of
a date.

Multiple "committer" fields seems like an equally reasonable thing to
add support for at the same time, by the way.

>  2. Teach ‘git fsck’ (and hence index-pack, etc) to warn about them but
>     not error out.

git fsck seems to work just fine with multiple author fields in a
commit.

git fast-import needs fixing, though; it currently crashes if given
multiple author fields.

>  3. Add a configuration variable to allow git to produce
>     multiple-author commits.  Such commits would make the repository
>     unusable by versions of git without (1) and (2), so probably nobody
>     would want to enable this for a while.

Agreed; the usual backward-compatibility delay.

> Sounds doable but a lot of trouble.  Maybe Nicolas Pitre or Shawn Pearce
> could say more if you want to pursue this.
> 
> Alternatively, maybe format-patch, fast-import/fast-export, and am
> should cheat by processing Co-authored-by lines at the top of the final
> paragraph of the commit message themselves.

Even with Git's current support for Signed-off-by, it still makes a
point of generally not parsing the commit message in any way.  That
seems like a feature worth preserving.

> BTW, thanks for all your work on git.  Your bug reports are a lot of
> fun to read.

Thanks!  Always nice to hear. :)

> What do you think?

I have this on my long-term TODO list to implement at some point, when I
scrounge up enough round tuits. :)

- Josh Triplett




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 08:30:13 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.