{"thread":{"id":"12999","subject":"How do I set the committer with cherry-pick? (or is there a better way to get changes from someone?)","startedAt":"2008-04-05T23:42:55Z","lastAt":"2008-04-06T01:18:45Z","messageCount":4,"participants":["Pat Maddox","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"73717","messageId":"810a540e0804051642r79dc10a7h2a231561062b13ea@mail.gmail.com","threadId":"12999","inReplyTo":null,"subject":"How do I set the committer with cherry-pick? (or is there a better way to get changes from someone?)","fromName":"Pat Maddox","fromEmail":"pergesu@gmail.com","sentAt":"2008-04-05T23:42:55Z","receivedAt":"2008-04-05T23:42:55Z","isPatch":false,"sender":{"key":"pergesu@gmail.com","avatar":null},"body":"I'm helping to maintain a project, so people send me requests to pull\nfrom their repos.  So I create a branch and then pull their stuff in,\ntaking a look at the various different commits.  I write the commit\nnumbers that I want to cherry pick to a file (also is there a better\nway of handling this?  it's a bit tedious.  it'd be nice to mark\ncertain commits for cherry picking and then suck them all in later).\nThen when I've gone through all the new commits and chosen the ones I\nwant, I check out the master branch and cherry-pick those commits in.\n\nAt this point the commits are in the repo, but they only have author\ninformation.  I'd like to specify that I'm the one who committed this\nchange now.  How can I do that?\n\nAnd finally, is this a good way to incorporate changes from other\ndevs?  Is there a better way?\n\nPat\n"},{"id":"73719","messageId":"7vhcefvoeg.fsf@gitster.siamese.dyndns.org","threadId":"12999","inReplyTo":"810a540e0804051642r79dc10a7h2a231561062b13ea@mail.gmail.com","subject":"Re: How do I set the committer with cherry-pick? (or is there a better way to get changes from someone?)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-04-06T00:05:11Z","receivedAt":"2008-04-06T00:05:11Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Pat Maddox\" <pergesu@gmail.com> writes:\n\n> At this point the commits are in the repo, but they only have author\n> information.  I'd like to specify that I'm the one who committed this\n> change now.  How can I do that?\n\nYou've already done that.  They are not what you _wrote_ so your name\nwon't be on \"Author:\" lines, but you made into commits in the final\nhistory, and your name would appear on \"Committer:\" lines.\n\nTry \"log --pretty=fuller\".\n\n> And finally, is this a good way to incorporate changes from other\n> devs?  Is there a better way?\n\nA _better way_, especially because you are already pulling from them,\nwould be just \"pull\", without having to cherry-pick to clean-up the\nhistory.\n\nThe reason you are being forced to cherry-pick is probably _their_\nhistories you pulled are suboptimal and full of garbage commit, containing\nirrelevant changes you do not want to include in the mainline you\nmaintain.  Have _THEM_ clean their act and prepare clean history that\nconsists only of relevant commits.  Shift as much burden as possible to\nthe contributors; otherwise the central integrator will become the\nbottleneck in the process.\n"},{"id":"73722","messageId":"810a540e0804051758j5daea9a8vfe36396ecbb36a08@mail.gmail.com","threadId":"12999","inReplyTo":"7vhcefvoeg.fsf@gitster.siamese.dyndns.org","subject":"Re: How do I set the committer with cherry-pick? (or is there a better way to get changes from someone?)","fromName":"Pat Maddox","fromEmail":"pergesu@gmail.com","sentAt":"2008-04-06T00:58:33Z","receivedAt":"2008-04-06T00:58:33Z","isPatch":false,"sender":{"key":"pergesu@gmail.com","avatar":null},"body":"On Sat, Apr 5, 2008 at 5:05 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> \"Pat Maddox\" <pergesu@gmail.com> writes:\n>\n>  > At this point the commits are in the repo, but they only have author\n>  > information.  I'd like to specify that I'm the one who committed this\n>  > change now.  How can I do that?\n>\n>  You've already done that.  They are not what you _wrote_ so your name\n>  won't be on \"Author:\" lines, but you made into commits in the final\n>  history, and your name would appear on \"Committer:\" lines.\n>\n>  Try \"log --pretty=fuller\".\n\nAh, okay.  I see.  Thanks.\n\n\n>  > And finally, is this a good way to incorporate changes from other\n>  > devs?  Is there a better way?\n>\n>  A _better way_, especially because you are already pulling from them,\n>  would be just \"pull\", without having to cherry-pick to clean-up the\n>  history.\n>\n>  The reason you are being forced to cherry-pick is probably _their_\n>  histories you pulled are suboptimal and full of garbage commit, containing\n>  irrelevant changes you do not want to include in the mainline you\n>  maintain.  Have _THEM_ clean their act and prepare clean history that\n>  consists only of relevant commits.  Shift as much burden as possible to\n>  the contributors; otherwise the central integrator will become the\n>  bottleneck in the process.\n\nThat makes sense.  So let's say somebody made some changes of their\nown that I don't want in the repository.  Would the best thing for\nthem to do be to create a new branch off of my main line, and then\ncherry-pick their commits in themself.  Then they send me the url\nalong with the branch, so that when I pull from them it's only the new\ncommits applied to the main line.\n\nAnd finally, when I experimented with doing a pull instead of\ncherry-pick, it listed the original author as the committer instead of\nmyself.  I think you're absolutely right that the burden should be on\nthem, so I can tell them to create a clean commit branch and just pull\nfrom it, but I still need to be listed as the committer.\n\nPat\n"},{"id":"73723","messageId":"7vwsnbu6fe.fsf@gitster.siamese.dyndns.org","threadId":"12999","inReplyTo":"810a540e0804051758j5daea9a8vfe36396ecbb36a08@mail.gmail.com","subject":"Re: How do I set the committer with cherry-pick? (or is there a better way to get changes from someone?)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-04-06T01:18:45Z","receivedAt":"2008-04-06T01:18:45Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Pat Maddox\" <pergesu@gmail.com> writes:\n\n> And finally, when I experimented with doing a pull instead of\n> cherry-pick, it listed the original author as the committer instead of\n> myself.  I think you're absolutely right that the burden should be on\n> them, so I can tell them to create a clean commit branch and just pull\n> from it, but I still need to be listed as the committer.\n\nWell, at that point, you are not the committer for their changes on their\nclean history, and you shouldn't expect to be recorded as such.  Your\ncontribution to the project might still be recorded as the committer of\nthe merge commit that pulled their contributions in, though.\n\nAny history is just as valid as your integration branch's history.  There\nmay be hundreds of potential histories in the universe --- each and every\ncontributor, anybody who clones and plays with the project may create his\nown history.  Each contributor in their repository will be commiting their\nchanges and building their histories.  If one of these alternative\nhistories is so agreeable for you that makes you happy to pull from it,\nthat means the creator of that history did extra work to keep it clean (or\nrebuilt it to look like clean).  Give the contributor the credit for his\nown segment of the history when you merge from him.\n\nAmong these many alternate histories, yours may happen to be the one many\npeople consider more authoritative than others', but other than that, you\nare not any more special than them.\n\nThat's what distributed means.\n"}]}