* How do I set the committer with cherry-pick? (or is there a better way to get changes from someone?)
@ 2008-04-05 23:42 Pat Maddox
2008-04-06 0:05 ` Junio C Hamano
0 siblings, 1 reply; 4+ messages in thread
From: Pat Maddox @ 2008-04-05 23:42 UTC (permalink / raw)
To: git
I'm helping to maintain a project, so people send me requests to pull
from their repos. So I create a branch and then pull their stuff in,
taking a look at the various different commits. I write the commit
numbers that I want to cherry pick to a file (also is there a better
way of handling this? it's a bit tedious. it'd be nice to mark
certain commits for cherry picking and then suck them all in later).
Then when I've gone through all the new commits and chosen the ones I
want, I check out the master branch and cherry-pick those commits in.
At this point the commits are in the repo, but they only have author
information. I'd like to specify that I'm the one who committed this
change now. How can I do that?
And finally, is this a good way to incorporate changes from other
devs? Is there a better way?
Pat
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How do I set the committer with cherry-pick? (or is there a better way to get changes from someone?)
2008-04-05 23:42 How do I set the committer with cherry-pick? (or is there a better way to get changes from someone?) Pat Maddox
@ 2008-04-06 0:05 ` Junio C Hamano
2008-04-06 0:58 ` Pat Maddox
0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2008-04-06 0:05 UTC (permalink / raw)
To: Pat Maddox; +Cc: git
"Pat Maddox" <pergesu@gmail.com> writes:
> At this point the commits are in the repo, but they only have author
> information. I'd like to specify that I'm the one who committed this
> change now. How can I do that?
You've already done that. They are not what you _wrote_ so your name
won't be on "Author:" lines, but you made into commits in the final
history, and your name would appear on "Committer:" lines.
Try "log --pretty=fuller".
> And finally, is this a good way to incorporate changes from other
> devs? Is there a better way?
A _better way_, especially because you are already pulling from them,
would be just "pull", without having to cherry-pick to clean-up the
history.
The reason you are being forced to cherry-pick is probably _their_
histories you pulled are suboptimal and full of garbage commit, containing
irrelevant changes you do not want to include in the mainline you
maintain. Have _THEM_ clean their act and prepare clean history that
consists only of relevant commits. Shift as much burden as possible to
the contributors; otherwise the central integrator will become the
bottleneck in the process.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How do I set the committer with cherry-pick? (or is there a better way to get changes from someone?)
2008-04-06 0:05 ` Junio C Hamano
@ 2008-04-06 0:58 ` Pat Maddox
2008-04-06 1:18 ` Junio C Hamano
0 siblings, 1 reply; 4+ messages in thread
From: Pat Maddox @ 2008-04-06 0:58 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On Sat, Apr 5, 2008 at 5:05 PM, Junio C Hamano <gitster@pobox.com> wrote:
> "Pat Maddox" <pergesu@gmail.com> writes:
>
> > At this point the commits are in the repo, but they only have author
> > information. I'd like to specify that I'm the one who committed this
> > change now. How can I do that?
>
> You've already done that. They are not what you _wrote_ so your name
> won't be on "Author:" lines, but you made into commits in the final
> history, and your name would appear on "Committer:" lines.
>
> Try "log --pretty=fuller".
Ah, okay. I see. Thanks.
> > And finally, is this a good way to incorporate changes from other
> > devs? Is there a better way?
>
> A _better way_, especially because you are already pulling from them,
> would be just "pull", without having to cherry-pick to clean-up the
> history.
>
> The reason you are being forced to cherry-pick is probably _their_
> histories you pulled are suboptimal and full of garbage commit, containing
> irrelevant changes you do not want to include in the mainline you
> maintain. Have _THEM_ clean their act and prepare clean history that
> consists only of relevant commits. Shift as much burden as possible to
> the contributors; otherwise the central integrator will become the
> bottleneck in the process.
That makes sense. So let's say somebody made some changes of their
own that I don't want in the repository. Would the best thing for
them to do be to create a new branch off of my main line, and then
cherry-pick their commits in themself. Then they send me the url
along with the branch, so that when I pull from them it's only the new
commits applied to the main line.
And finally, when I experimented with doing a pull instead of
cherry-pick, it listed the original author as the committer instead of
myself. I think you're absolutely right that the burden should be on
them, so I can tell them to create a clean commit branch and just pull
from it, but I still need to be listed as the committer.
Pat
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How do I set the committer with cherry-pick? (or is there a better way to get changes from someone?)
2008-04-06 0:58 ` Pat Maddox
@ 2008-04-06 1:18 ` Junio C Hamano
0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2008-04-06 1:18 UTC (permalink / raw)
To: Pat Maddox; +Cc: git
"Pat Maddox" <pergesu@gmail.com> writes:
> And finally, when I experimented with doing a pull instead of
> cherry-pick, it listed the original author as the committer instead of
> myself. I think you're absolutely right that the burden should be on
> them, so I can tell them to create a clean commit branch and just pull
> from it, but I still need to be listed as the committer.
Well, at that point, you are not the committer for their changes on their
clean history, and you shouldn't expect to be recorded as such. Your
contribution to the project might still be recorded as the committer of
the merge commit that pulled their contributions in, though.
Any history is just as valid as your integration branch's history. There
may be hundreds of potential histories in the universe --- each and every
contributor, anybody who clones and plays with the project may create his
own history. Each contributor in their repository will be commiting their
changes and building their histories. If one of these alternative
histories is so agreeable for you that makes you happy to pull from it,
that means the creator of that history did extra work to keep it clean (or
rebuilt it to look like clean). Give the contributor the credit for his
own segment of the history when you merge from him.
Among these many alternate histories, yours may happen to be the one many
people consider more authoritative than others', but other than that, you
are not any more special than them.
That's what distributed means.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-04-06 1:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-05 23:42 How do I set the committer with cherry-pick? (or is there a better way to get changes from someone?) Pat Maddox
2008-04-06 0:05 ` Junio C Hamano
2008-04-06 0:58 ` Pat Maddox
2008-04-06 1:18 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).