Re: Keep original author with git merge --squash?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> writes:

> On Thu, Feb 12, 2015 at 03:32:37PM -0800, Junio C Hamano wrote:
>
>> > It also raises a question for the proposal in this thread: if there are
>> > multiple "Author:" lines, which one do we take? The first, or the last?
>> 
>> I was siding with David's "pay attention to in-buffer Author: only
>> when all of them agree".  When squash-merging a branch with two or
>> more authors, we would attribute the authorship silently and
>> automatically to you if you do not do anything special otherwise.
>
> That's probably reasonable. I was thinking more of a case where you made
> some fixups on top of somebody else's branch, and then used "git rebase
> -i" to squash them together. But I think we already use the authorship
> for the root of the squash in that case.
>
> This case collapses nicely if we make a slight tweak to your proposed
> behavior (or maybe this is what you meant). If there are multiple
> authors listed, we behave as if none was listed. That would leave the
> authorship as it behaves today (with the author of the first commit) if
> you do nothing, or you can override it by dropping all but one.

I actually was (and am still) wondering that "silently ignore all of
them if there are multiple ones that contradict with each other" is
a bad idea, and that was why the last item on the "possible
alternatives" list was to error out and ask clarification.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]