{"thread":{"id":"29518","subject":"How best to handle multiple-authorship commits in GIT?","startedAt":"2012-02-02T12:25:09Z","lastAt":"2012-02-03T19:49:43Z","messageCount":11,"participants":["David Howells","Frans Klaver","Valerie Aurora","Jakub Narebski","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"183597","messageId":"21056.1328185509@redhat.com","threadId":"29518","inReplyTo":null,"subject":"How best to handle multiple-authorship commits in GIT?","fromName":"David Howells","fromEmail":"dhowells@redhat.com","sentAt":"2012-02-02T12:25:09Z","receivedAt":"2012-02-02T12:25:09Z","isPatch":false,"sender":{"key":"dhowells@redhat.com","avatar":null},"body":"\nHi,\n\nI've been assigned a stack of patches to maintain and try and get upstream by\nmy employer.  Most of the patches currently have the authorship set to Val,\nbut since I'll be maintaining them if they go in upstream and I've changed\nthem a lot, I feel I should reassign the author field to myself so people\npester me rather than Val with questions about them.  However, I don't want to\ndeny Val or any other contributor credit for their work on the patches.\n\nI can see a number of ways of doing this, and am wondering which will be best:\n\n (1) Ascribe multiple authorship directly in the commit.  I suspect this would\n     require a change to GIT and its associated tools.  That way I could put my\n     name in the priority pestering spot, but doing a search on authorship\n     would still credit Val and others.\n\n (2) Add an extra tag 'Originally-authored-by' (or maybe 'Coauthored-by' as I\n     saw someone recommend) in amongst the 'Signed-off-by' list.  But that\n     doesn't give them credit in a gitweb search without changing gitweb.\n\n (3) Don't actually modify Val's commits to bring them up to date, but rather\n     create a historical GIT tree with Val's commits committed as-are and then\n     add my changes to the top in a number of large merge commits (there have\n     been multiple major breakages due to different merge windows).\n\n     I dislike this approach because it doesn't produce a nice set of patches I\n     can give to someone to review (which is a must).  Plus, for the most part,\n     it's actually easier to port Val's patches individually.\n\nCan GIT be modified to do (1)?  Gitweb's display need only show one of the\nauthors in the single-row-per-patch list mode, but should find a patch by any\nof the authors in an author search and should display all the authors in the\ncommit display.\n\nDavid\n"},{"id":"183600","messageId":"CAH6sp9P8ehXoC075dcK9ni5rJBV9iCZmLHTBr-UR+-jbD3c6Ww@mail.gmail.com","threadId":"29518","inReplyTo":"21056.1328185509@redhat.com","subject":"Re: How best to handle multiple-authorship commits in GIT?","fromName":"Frans Klaver","fromEmail":"fransklaver@gmail.com","sentAt":"2012-02-02T13:41:09Z","receivedAt":"2012-02-02T13:41:09Z","isPatch":false,"sender":{"key":"fransklaver@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1876483?v=4"},"body":"Hi,\n\nOn Thu, Feb 2, 2012 at 1:25 PM, David Howells <dhowells@redhat.com> wrote:\n>\n> Hi,\n>\n> I've been assigned a stack of patches to maintain and try and get upstream by\n> my employer.  Most of the patches currently have the authorship set to Val,\n> but since I'll be maintaining them if they go in upstream and I've changed\n> them a lot, I feel I should reassign the author field to myself so people\n> pester me rather than Val with questions about them.  However, I don't want to\n> deny Val or any other contributor credit for their work on the patches.\n>\n> I can see a number of ways of doing this, and am wondering which will be best:\n>\n>  (1) Ascribe multiple authorship directly in the commit.  I suspect this would\n>     require a change to GIT and its associated tools.  That way I could put my\n>     name in the priority pestering spot, but doing a search on authorship\n>     would still credit Val and others.\n>\n>  (2) Add an extra tag 'Originally-authored-by' (or maybe 'Coauthored-by' as I\n>     saw someone recommend) in amongst the 'Signed-off-by' list.  But that\n>     doesn't give them credit in a gitweb search without changing gitweb.\n>\n>  (3) Don't actually modify Val's commits to bring them up to date, but rather\n>     create a historical GIT tree with Val's commits committed as-are and then\n>     add my changes to the top in a number of large merge commits (there have\n>     been multiple major breakages due to different merge windows).\n>\n>     I dislike this approach because it doesn't produce a nice set of patches I\n>     can give to someone to review (which is a must).  Plus, for the most part,\n>     it's actually easier to port Val's patches individually.\n>\n> Can GIT be modified to do (1)?  Gitweb's display need only show one of the\n> authors in the single-row-per-patch list mode, but should find a patch by any\n> of the authors in an author search and should display all the authors in the\n> commit display.\n\nI always thought of the author field as being an indication of who is\nultimately responsible for its implementation (the one in the\npestering spot). (1) may seem desirous, but doesn't (2) seem like a\ncleaner and more maintainable solution? Gitweb will show the entire\nlog message if people are interested in the exact change, right?\n\nCheers,\nFrans\n"},{"id":"183619","messageId":"9B990DDC-858D-43BA-BF9E-E0C3435354AF@gmail.com","threadId":"29518","inReplyTo":"21056.1328185509@redhat.com","subject":"Re: How best to handle multiple-authorship commits in GIT?","fromName":"Valerie Aurora","fromEmail":"valerie.aurora@gmail.com","sentAt":"2012-02-02T18:00:02Z","receivedAt":"2012-02-02T18:00:02Z","isPatch":false,"sender":{"key":"valerie.aurora@gmail.com","avatar":null},"body":"On Feb 2, 2012, at 4:25, David Howells <dhowells@redhat.com> wrote:\n\n> \n> Hi,\n> \n> I've been assigned a stack of patches to maintain and try and get upstream by\n> my employer.  Most of the patches currently have the authorship set to Val,\n> but since I'll be maintaining them if they go in upstream and I've changed\n> them a lot, I feel I should reassign the author field to myself so people\n> pester me rather than Val with questions about them.  However, I don't want to\n> deny Val or any other contributor credit for their work on the patches.\n> \n> I can see a number of ways of doing this, and am wondering which will be best:\n> \n> (1) Ascribe multiple authorship directly in the commit.  I suspect this would\n>     require a change to GIT and its associated tools.  That way I could put my\n>     name in the priority pestering spot, but doing a search on authorship\n>     would still credit Val and others.\n> \n> (2) Add an extra tag 'Originally-authored-by' (or maybe 'Coauthored-by' as I\n>     saw someone recommend) in amongst the 'Signed-off-by' list.  But that\n>     doesn't give them credit in a gitweb search without changing gitweb.\n> \n> (3) Don't actually modify Val's commits to bring them up to date, but rather\n>     create a historical GIT tree with Val's commits committed as-are and then\n>     add my changes to the top in a number of large merge commits (there have\n>     been multiple major breakages due to different merge windows).\n> \n>     I dislike this approach because it doesn't produce a nice set of patches I\n>     can give to someone to review (which is a must).  Plus, for the most part,\n>     it's actually easier to port Val's patches individually.\n> \n> Can GIT be modified to do (1)?  Gitweb's display need only show one of the\n> authors in the single-row-per-patch list mode, but should find a patch by any\n> of the authors in an author search and should display all the authors in the\n> commit display.\n> \n> David\n\nThanks, David!  I had the same trouble with my set: while I entirely rewrote some patches, I still felt Jan Blunck deserved primary credit.  I don't recall my solution, but I'm fine with mentioning my name in the commit message (and I think Jan should get credit too).\n\nIn general, this is a big problem for motivating contributors in other cases.  Some maintainers have a habit of trivially rewriting patches so that, technically, no line is the same, then taking authorship and giving the actual author an ambiguous Signed-off-by.  David hasn't done this here, of course - these are major rewrites - but when someone does all the hard work of finding and fixing a problem, the credit shouldn't go to the person who prettied it up.  There is a line in the kernel doc saying how this should be handled, suggested by Rusty, but it's not being followed.\n\nFirst class support for multiple authorship would be a big way to motivate contributors.\n\n-VAL"},{"id":"183622","messageId":"15281.1328207789@redhat.com","threadId":"29518","inReplyTo":"9B990DDC-858D-43BA-BF9E-E0C3435354AF@gmail.com","subject":"Re: How best to handle multiple-authorship commits in GIT?","fromName":"David Howells","fromEmail":"dhowells@redhat.com","sentAt":"2012-02-02T18:36:29Z","receivedAt":"2012-02-02T18:36:29Z","isPatch":false,"sender":{"key":"dhowells@redhat.com","avatar":null},"body":"Valerie Aurora <valerie.aurora@gmail.com> wrote:\n\n> There is a line in the kernel doc saying how this should be handled,\n> suggested by Rusty, but it's not being followed.\n\nDo you know where?\n\nDavid\n"},{"id":"183644","messageId":"m3bophc8je.fsf@localhost.localdomain","threadId":"29518","inReplyTo":"9B990DDC-858D-43BA-BF9E-E0C3435354AF@gmail.com","subject":"Re: How best to handle multiple-authorship commits in GIT?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2012-02-02T19:57:18Z","receivedAt":"2012-02-02T19:57:18Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Valerie Aurora <valerie.aurora@gmail.com> writes:\n\n> [...]  I had the same trouble with my set: while I entirely\n> rewrote some patches, I still felt Jan Blunck deserved primary\n> credit.  I don't recall my solution, but I'm fine with mentioning my\n> name in the commit message (and I think Jan should get credit too).\n\nThat's what various *-by headers are for.  Signed-off-by is for\nprovenance.\n\nNb. you can search the whole commit message in gitweb, not only author\nor committer.\n \n> In general, this is a big problem for motivating contributors in\n> other cases.  Some maintainers have a habit of trivially rewriting\n> patches so that, technically, no line is the same, then taking\n> authorship and giving the actual author an ambiguous Signed-off-by.\n\nMaybe it was cause by tools accidentally stealing authorship?  With\n\"git commit --amend --author=...\" it is now easy to add authorship\nback.\n\n> David hasn't done this here, of course - these are major rewrites -\n> but when someone does all the hard work of finding and fixing a\n> problem, the credit shouldn't go to the person who prettied it up.\n> There is a line in the kernel doc saying how this should be handled,\n> suggested by Rusty, but it's not being followed.\n\nLink?\n \n> First class support for multiple authorship would be a big way to\n> motivate contributors.\n\nWell, multi-line commit headers were only recently added to git (when\nadding signed pull / singed commit stuff), but I think in many places\ngit assumes single authorship, and it would be hard to change...\n\nThere was some workaround that people doing pair programming invented,\nIIRC...\n\n-- \nJakub Narebski\n"},{"id":"183658","messageId":"17890.1328214811@redhat.com","threadId":"29518","inReplyTo":"CAH6sp9P8ehXoC075dcK9ni5rJBV9iCZmLHTBr-UR+-jbD3c6Ww@mail.gmail.com","subject":"Re: How best to handle multiple-authorship commits in GIT?","fromName":"David Howells","fromEmail":"dhowells@redhat.com","sentAt":"2012-02-02T20:33:31Z","receivedAt":"2012-02-02T20:33:31Z","isPatch":false,"sender":{"key":"dhowells@redhat.com","avatar":null},"body":"Frans Klaver <fransklaver@gmail.com> wrote:\n\n> I always thought of the author field as being an indication of who is\n> ultimately responsible for its implementation (the one in the\n> pestering spot).\n\nDefine 'ultimate responsibility for an implementation'.  I'm further developing\npatches that Val has (at least partially) implemented.  By Val's admission some\nof the patches she further developed beyond what Jan Blunck had implemented.\nThe chain may extend further.  To that end all three of us are authors of some\nof the patches.\n\nHowever, if you meant 'maintenance' rather than 'implementation', then, yes,\nthat would be me (for the moment at least).  But if that's the case, then\nshouldn't it be 'Maintainer' and not 'Author'?  And, besides, that's what the\nMAINTAINERS file is for.\n\n> (1) may seem desirous, but doesn't (2) seem like a cleaner and more\n> maintainable solution?\n\nNo.  I would say that properly supporting multiple authors in the commit object\nis the cleaner solution.  It's not the *easier* solution, however, and would\nrequire an upgrade to the version of GIT used to parse these commits.  That\nI'll grant you.\n\n> Gitweb will show the entire log message if people are interested in the\n> exact change, right?\n\nBut if I say to Gitweb \"show me the patches authored by Val\" it will *not* turn\nup these patches, and in that way will deny Val credit.  Yes, you can see that\nVal altered that patch if you look at that patch directly - but you have to\nknow where to go and look, in which case you already know or suspect that Val\nis credited with patches in that area.\n\nSo to make (2) work, Gitweb needs to search for the additional authoring fields\nwhen asked to credit people with the patches they've worked on.\n\nSimilarly gitk and possibly other tools would need to do the same.\n\n*That* would be fine by me, I suppose.  I don't think it's the correct way to\ndo it, but it might be the logical way since this wasn't build in from the\nbeginning - and the main thing would be to turn up the prior or joint\nauthorship to author-based searches.\n\nDavid\n"},{"id":"183693","messageId":"CAD-XujkVK=tOtmVS90U0KAutFZ55jxsHMKuuMppXOi-H6ZY=RQ@mail.gmail.com","threadId":"29518","inReplyTo":"15281.1328207789@redhat.com","subject":"Re: How best to handle multiple-authorship commits in GIT?","fromName":"Valerie Aurora","fromEmail":"valerie.aurora@gmail.com","sentAt":"2012-02-03T02:18:50Z","receivedAt":"2012-02-03T02:18:50Z","isPatch":false,"sender":{"key":"valerie.aurora@gmail.com","avatar":null},"body":"On Thu, Feb 2, 2012 at 10:36 AM, David Howells <dhowells@redhat.com> wrote:\n> Valerie Aurora <valerie.aurora@gmail.com> wrote:\n>\n>> There is a line in the kernel doc saying how this should be handled,\n>> suggested by Rusty, but it's not being followed.\n>\n> Do you know where?\n\nA fault in my memory - I asked Rusty for advice on a related problem\nand he gave me additional advice, he didn't suggest (so far as I know)\nthe changes to the kernel docs.  Here's what SubmittingPatches has to\nsay:\n\n\"If you are a subsystem or branch maintainer, sometimes you need to slightly\nmodify patches you receive in order to merge them, because the code is not\nexactly the same in your tree and the submitters'. If you stick strictly to\nrule (c), you should ask the submitter to rediff, but this is a totally\ncounter-productive waste of time and energy. Rule (b) allows you to adjust\nthe code, but then it is very impolite to change one submitter's code and\nmake him endorse your bugs. To solve this problem, it is recommended that\nyou add a line between the last Signed-off-by header and yours, indicating\nthe nature of your changes. While there is nothing mandatory about this, it\nseems like prepending the description with your mail and/or name, all\nenclosed in square brackets, is noticeable enough to make it obvious that\nyou are responsible for last-minute changes. Example :\n\n\tSigned-off-by: Random J Developer <random@developer.example.org>\n\t[lucky@maintainer.example.org: struct foo moved from foo.c to foo.h]\n\tSigned-off-by: Lucky K Maintainer <lucky@maintainer.example.org>\n\nThis practise is particularly helpful if you maintain a stable branch and\nwant at the same time to credit the author, track changes, merge the fix,\nand protect the submitter from complaints. Note that under no circumstances\ncan you change the author's identity (the From header), as it is the one\nwhich appears in the changelog.\"\n\nAnd Rusty's practice as of a year or two ago is for \"minor mods\" to a\npatch, to leave the authorship the same, and add a Signed-off-by:\n\nSigned-off-by: Some Upstream Author\nSigned-off-by: Maintainer or Merger (rewrote error handling)\n\nAnd for a complete (meaningful) rewrite such as David has done, he\nchanges the commit authorship and adds a Signed-off-by for the\noriginal author.\n\nThat's existing guidelines and practice.\n\n-VAL\n"},{"id":"183696","messageId":"7v1uqctsat.fsf@alter.siamese.dyndns.org","threadId":"29518","inReplyTo":"CAD-XujkVK=tOtmVS90U0KAutFZ55jxsHMKuuMppXOi-H6ZY=RQ@mail.gmail.com","subject":"Re: How best to handle multiple-authorship commits in GIT?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-02-03T05:11:22Z","receivedAt":"2012-02-03T05:11:22Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Valerie Aurora <valerie.aurora@gmail.com> writes:\n\n> And Rusty's practice as of a year or two ago is for \"minor mods\" to a\n> patch, to leave the authorship the same, and add a Signed-off-by:\n>\n> Signed-off-by: Some Upstream Author\n> Signed-off-by: Maintainer or Merger (rewrote error handling)\n>\n> And for a complete (meaningful) rewrite such as David has done, he\n> changes the commit authorship and adds a Signed-off-by for the\n> original author.\n>\n> That's existing guidelines and practice.\n\nAll sounds very sensible.  Thanks for a summary.\n"},{"id":"183731","messageId":"4681.1328276820@redhat.com","threadId":"29518","inReplyTo":"CAD-XujkVK=tOtmVS90U0KAutFZ55jxsHMKuuMppXOi-H6ZY=RQ@mail.gmail.com","subject":"Re: How best to handle multiple-authorship commits in GIT?","fromName":"David Howells","fromEmail":"dhowells@redhat.com","sentAt":"2012-02-03T13:47:00Z","receivedAt":"2012-02-03T13:47:00Z","isPatch":false,"sender":{"key":"dhowells@redhat.com","avatar":null},"body":"Valerie Aurora <valerie.aurora@gmail.com> wrote:\n\n> And for a complete (meaningful) rewrite such as David has done, he\n> changes the commit authorship and adds a Signed-off-by for the\n> original author.\n\nVal[*] hasn't signed off all her patches, and indeed I've merged together some\npatches that she has signed off and some she hasn't.  I can't simply add\nSigned-off-by her without her permission.  However, if she's willing for me to\nadd such lines, then I can do so.\n\n> Signed-off-by: Some Upstream Author\n> Signed-off-by: Maintainer or Merger (rewrote error handling)\n\nAnd if the changes are more than can be put in what's left of the line?  I\nwould've thought it would make more sense to do something like:\n\n  Signed-off-by: Valerie Aurora <valerie.aurora@gmail.com> (Original author)\n  Signed-off-by: David Howells <dhowells@redhat.com> (Further development)\n\nDavid\n\n[*] Apologies for talking about/to you in the third person, Val.\n"},{"id":"183748","messageId":"7vty37rcur.fsf@alter.siamese.dyndns.org","threadId":"29518","inReplyTo":"4681.1328276820@redhat.com","subject":"Re: How best to handle multiple-authorship commits in GIT?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-02-03T18:27:56Z","receivedAt":"2012-02-03T18:27:56Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"David Howells <dhowells@redhat.com> writes:\n\n> Valerie Aurora <valerie.aurora@gmail.com> wrote:\n>\n>> And for a complete (meaningful) rewrite such as David has done, he\n>> changes the commit authorship and adds a Signed-off-by for the\n>> original author.\n>\n> Val[*] hasn't signed off all her patches, and indeed I've merged together some\n> patches that she has signed off and some she hasn't.  I can't simply add\n> Signed-off-by her without her permission.  However, if she's willing for me to\n> add such lines, then I can do so.\n>\n>> Signed-off-by: Some Upstream Author\n>> Signed-off-by: Maintainer or Merger (rewrote error handling)\n>\n> And if the changes are more than can be put in what's left of the line?  I\n> would've thought it would make more sense to do something like:\n>\n>   Signed-off-by: Valerie Aurora <valerie.aurora@gmail.com> (Original author)\n>   Signed-off-by: David Howells <dhowells@redhat.com> (Further development)\n>\n> David\n\nThat all sounds sensible.\n\nI personally think the \"recognition\" factor Valerie alluded to in one of\nher earlier message is a real and important issue, but I do not think\nadding arbitrary number of \"author\" headers to the commit object would\nhelp very much to solve it, for various reasons:\n\n * While we made it easy to run \"git shortlog -s -n --since=3.months\" and\n   congratulate himself with \"I now am the third most active person!\" for\n   anybody, Git itself does not ship an equally easy way to analyze other\n   kinds of contributions to your project.  I am merely a bystander, but\n   if I recall correctly, there were discussions on how to recognize\n   contributions by bug-reporters and testers using the history stored in\n   Git on the kernel list.  The types of contribution you would want to\n   recognize however would be different from project to project.  For that\n   kind of analysis, you would be better off doing something like what\n   lwn.net does, mining the text from the message part of the log.\n\n * Even if we limit the issue to \"who wrote X\" (replace X with the name of\n   any piece of software), taking \"author\" field as anything more than an\n   approximation would be asking for a trouble.  Not all patches are of\n   equal impact and importance.\n\n * You would also have to think about how you would present \"git shortlog\"\n   output if you updated Git to record more than one \"author\" field in the\n   commit header.  If Valerie wrote 27 patches by herself, 33 patches\n   together with you sitting next to each other, 17 patches with somebody\n   else, how would the entries for her, you and the third person look\n   like?  Or would combinations of \"Valerie & David\", \"Valerie & the\n   third person\", etc. have separate entries in the output?\n\nIn short, I would say that you should take the name recorded in the\n\"author\" field nothing more than the primary contact for a particular\ncommit to be used in case others have question on it later.\n"},{"id":"183752","messageId":"CAD-XujnmX=GzJ0+otT4EZaG+qRJ=ohzp4Ctr7hqjtur_thPPRA@mail.gmail.com","threadId":"29518","inReplyTo":"4681.1328276820@redhat.com","subject":"Re: How best to handle multiple-authorship commits in GIT?","fromName":"Valerie Aurora","fromEmail":"valerie.aurora@gmail.com","sentAt":"2012-02-03T19:49:43Z","receivedAt":"2012-02-03T19:49:43Z","isPatch":false,"sender":{"key":"valerie.aurora@gmail.com","avatar":null},"body":"On Fri, Feb 3, 2012 at 5:47 AM, David Howells <dhowells@redhat.com> wrote:\n> Valerie Aurora <valerie.aurora@gmail.com> wrote:\n>\n>> And for a complete (meaningful) rewrite such as David has done, he\n>> changes the commit authorship and adds a Signed-off-by for the\n>> original author.\n>\n> Val[*] hasn't signed off all her patches, and indeed I've merged together some\n> patches that she has signed off and some she hasn't.  I can't simply add\n> Signed-off-by her without her permission.  However, if she's willing for me to\n> add such lines, then I can do so.\n\nCc me on the next posting and I'll review and add my Signed-off-by if\nit's missing anywhere it should be?  Or send them privately, whichever\nyou prefer.\n\n-VAL\n"}]}