rev-list: documentation and test for --cherry-mark
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
adbbb31e0d
commit
cb56e3093a
@ -33,6 +33,7 @@ SYNOPSIS
|
|||||||
[ \--left-right ]
|
[ \--left-right ]
|
||||||
[ \--left-only ]
|
[ \--left-only ]
|
||||||
[ \--right-only ]
|
[ \--right-only ]
|
||||||
|
[ \--cherry-mark ]
|
||||||
[ \--cherry-pick ]
|
[ \--cherry-pick ]
|
||||||
[ \--encoding[=<encoding>] ]
|
[ \--encoding[=<encoding>] ]
|
||||||
[ \--(author|committer|grep)=<pattern> ]
|
[ \--(author|committer|grep)=<pattern> ]
|
||||||
|
@ -305,6 +305,11 @@ ifdef::git-rev-list[]
|
|||||||
to /dev/null as the output does not have to be formatted.
|
to /dev/null as the output does not have to be formatted.
|
||||||
endif::git-rev-list[]
|
endif::git-rev-list[]
|
||||||
|
|
||||||
|
--cherry-mark::
|
||||||
|
|
||||||
|
Like `--cherry-pick` (see below) but mark equivalent commits
|
||||||
|
with `=` rather than omitting them, and inequivalent ones with `+`.
|
||||||
|
|
||||||
--cherry-pick::
|
--cherry-pick::
|
||||||
|
|
||||||
Omit any commit that introduces the same change as
|
Omit any commit that introduces the same change as
|
||||||
|
@ -99,6 +99,34 @@ test_expect_success '--cherry-pick bar does not come up empty (II)' '
|
|||||||
test_cmp actual.named expect
|
test_cmp actual.named expect
|
||||||
'
|
'
|
||||||
|
|
||||||
|
cat >expect <<EOF
|
||||||
|
+tags/F
|
||||||
|
=tags/D
|
||||||
|
+tags/E
|
||||||
|
=tags/C
|
||||||
|
EOF
|
||||||
|
|
||||||
|
test_expect_success '--cherry-mark' '
|
||||||
|
git rev-list --cherry-mark F...E -- bar > actual &&
|
||||||
|
git name-rev --stdin --name-only --refs="*tags/*" \
|
||||||
|
< actual > actual.named &&
|
||||||
|
test_cmp actual.named expect
|
||||||
|
'
|
||||||
|
|
||||||
|
cat >expect <<EOF
|
||||||
|
<tags/F
|
||||||
|
=tags/D
|
||||||
|
>tags/E
|
||||||
|
=tags/C
|
||||||
|
EOF
|
||||||
|
|
||||||
|
test_expect_success '--cherry-mark --left-right' '
|
||||||
|
git rev-list --cherry-mark --left-right F...E -- bar > actual &&
|
||||||
|
git name-rev --stdin --name-only --refs="*tags/*" \
|
||||||
|
< actual > actual.named &&
|
||||||
|
test_cmp actual.named expect
|
||||||
|
'
|
||||||
|
|
||||||
cat >expect <<EOF
|
cat >expect <<EOF
|
||||||
tags/E
|
tags/E
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user