revlist.c: introduce --left/right-only for unsymmetric picking
commit60adf7d73e44126289a98dada60f9c335ffc84b0
authorMichael J Gruber <git@drmicha.warpmail.net>
Mon, 21 Feb 2011 16:09:11 +0000 (21 17:09 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 22 Feb 2011 00:30:58 +0000 (21 16:30 -0800)
tree328a93806f5dc97b628c6f2fb673dea2b41e34f4
parent7ed863a85a6ce2c4ac4476848310b8f917ab41f9
revlist.c: introduce --left/right-only for unsymmetric picking

The existing "--cherry-pick" does not work with unsymmetric ranges
(A..B) for obvious reasons.

Introduce "--left-only" and "--right-only" which limit the output to
commits on the respective sides of a symmetric range (i.e. only "<"
resp. ">" commits as per "--left-right").

This is especially useful for things like

    git log --cherry-pick --right-only @{u}...

which is much more flexible (and descriptive) than

    git cherry @{u} | sed -ne 's/^+ //p'

and potentially more useful than

    git log --cherry-pick @{u}...

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
revision.c
revision.h