diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-09-12 22:15:35 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-09-13 01:11:55 -0700 |
commit | 5aaeb733f5745b37878901c4687ba67c6a70e581 (patch) | |
tree | 073bd6553e10f0c654a3e15e18c9c5bd52e055c5 /Documentation/gitglossary.txt | |
parent | grep: move logic to compile header pattern into a separate helper (diff) | |
download | tgif-5aaeb733f5745b37878901c4687ba67c6a70e581.tar.xz |
log --author: take union of multiple "author" requests
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 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 and committed by him, that have either
this or that", which is a lot more natural thing to ask.
We however need to be a bit more clever when the user asks more than one
"author" (or "committer"); because a commit has only one author (and one
committer), they ought to be interpreted as asking for union to be useful.
The current implementation simply added another author/committer pattern
at the same top-level for ALL-MATCH to insist on matching all, finding
nothing.
Turn
log --author=me --author=her \
--committer=him --committer=you \
--grep=this --grep=that
into
(ALL-MATCH
(OR (HEADER-AUTHOR me) (HEADER-AUTHOR her))
(OR (HEADER-COMMITTER him) (HEADER-COMMITTER you))
(OR (PATTERN this) (PATTERN that)))
instead.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/gitglossary.txt')
0 files changed, 0 insertions, 0 deletions