Re: Regression in git log with multiple authors

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

 



Emil Sit <sit@xxxxxxxxxxx> writes:

> Commit 80235ba79ef43349f455cce869397b3e726f4058 introduced a
> regression in a corner case for git log --author when multiple authors
> are specified.  Prior to 1.7.0.3, if I wanted to find all commits done
> by a series of authors, I could simply specify "git log --author=a1
> --author=a2" to get all commits done by a1 and a2.  However, in the
> latest releases, this finds nothing.

That is more or less deliberate, not in the sense that the patch wanted to
forbid looking for multiple authors but in the sense that the patch wanted
to apply the "grep" terms as intersection, not as union.

In the olden days,

    log --author=me --committer=him --grep=this --grep=that

used to be turned into:

    (OR (HEADER-AUTHOR me)
        (HEADER-COMMITTER him)
        (PATTERN this)
        (PATTERN that))

showing my patches that do not have any "this" nor "that", which was
totally bogus and useless.

80235ba ("log --author=me --grep=it" should find intersection, not union,
2010-01-17) improved it greatly to turn the same into:

    (all-match (HEADER-AUTHOR me)
	       (HEADER-COMMITTER him)
	       (OR
	         (PATTERN this)
                 (PATTERN that)))

That is, "show only patches by me committed by him that have either this
or that", which is a lot more natural thing to ask.  So simply reverting
the commit is out of question.

But I do not think it is a bad idea if you turned

    log --author=me --author=her --committer=him --committer=you --grep=this

into

    (all-match (OR
		(HEADER-AUTHOR me)
		(HEADER-AUTHOR her))
               (OR
	        (HEADER-COMMITTER him)
	        (HEADER-COMMITTER you))
	       (OR
	         (PATTERN this)))

as it is obvious that with multiple authors (or committers) the command
line is asking for union among them.
--
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]