diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-02-17 17:21:41 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-02-17 17:21:41 -0800 |
commit | dadc91ff0c15b655070ad334a27a734e91635bd5 (patch) | |
tree | c53f828a0941fae682ee087bd21e935de607e2e5 /t/t3206-range-diff.sh | |
parent | Merge branch 'js/range-diff-wo-dotdot' (diff) | |
parent | range-diff: offer --left-only/--right-only options (diff) | |
download | tgif-dadc91ff0c15b655070ad334a27a734e91635bd5.tar.xz |
Merge branch 'js/range-diff-one-side-only'
The "git range-diff" command learned "--(left|right)-only" option
to show only one side of the compared range.
* js/range-diff-one-side-only:
range-diff: offer --left-only/--right-only options
range-diff: move the diffopt initialization down one layer
range-diff: combine all options in a single data structure
range-diff: simplify code spawning `git log`
range-diff: libify the read_patches() function again
range-diff: avoid leaking memory in two error code paths
Diffstat (limited to 't/t3206-range-diff.sh')
-rwxr-xr-x | t/t3206-range-diff.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t3206-range-diff.sh b/t/t3206-range-diff.sh index b782d26820..1b26c4c2ef 100755 --- a/t/t3206-range-diff.sh +++ b/t/t3206-range-diff.sh @@ -733,4 +733,19 @@ test_expect_success 'format-patch --range-diff with multiple notes' ' test_cmp expect actual ' +test_expect_success '--left-only/--right-only' ' + git switch --orphan left-right && + test_commit first && + test_commit unmatched && + test_commit common && + git switch -C left-right first && + git cherry-pick common && + + git range-diff -s --left-only ...common >actual && + head_oid=$(git rev-parse --short HEAD) && + common_oid=$(git rev-parse --short common) && + echo "1: $head_oid = 2: $common_oid common" >expect && + test_cmp expect actual +' + test_done |