Regression in git log with multiple authors

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

 



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.

Here's a simple test case that demonstrates this:

diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh
index 023f225..587069c 100755
--- a/t/t7810-grep.sh
+++ b/t/t7810-grep.sh
@@ -372,6 +372,14 @@ test_expect_success 'log --grep --author
implicitly uses all-match' '
        test_cmp expect actual
 '

+test_expect_success 'log --author --author matches both authors' '
+       # author matches only initial and third
+       # frotz matches only second
+       git log --author="A U Thor" --author="frotz\.com>$"
--format=%s >actual &&
+        ( echo third ; echo second ; echo initial ) >expect &&
+       test_cmp expect actual
+'
+
 test_expect_success 'grep with CE_VALID file' '
        git update-index --assume-unchanged t/t &&
        rm t/t &&

This fails against master, but if you revert 80235ba, this will pass
(whereas obviously 'log --grep --author implicitly uses all-match'
will then fail).

It doesn't seem like I can work-around this with 'git log --author a1
--or --author a2'.  Is there some other way to find commits by a set
of authors? I don't think it makes sense to treat multiple --author
flags with "and' logic since a commit can only have one author.  So
maybe all --authors should be grouped with ors and then anded against
all --committers?

-- 
Emil Sit / http://www.emilsit.net/
--
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]