From: Junio C Hamano Date: Thu, 18 Feb 2021 01:21:41 +0000 (-0800) Subject: Merge branch 'js/range-diff-wo-dotdot' X-Git-Tag: v2.31.0-rc0~43 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=77348b0e6e350ec81b3880f99c6077d165df2276;p=thirdparty%2Fgit.git Merge branch 'js/range-diff-wo-dotdot' There are other ways than ".." for a single token to denote a "commit range", namely "^!" and "^-", but "git range-diff" did not understand them. * js/range-diff-wo-dotdot: range-diff(docs): explain how to specify commit ranges range-diff/format-patch: handle commit ranges other than A..B range-diff/format-patch: refactor check for commit range --- 77348b0e6e350ec81b3880f99c6077d165df2276 diff --cc t/t3206-range-diff.sh index ce24b5d735,2b518378d4..b782d26820 --- a/t/t3206-range-diff.sh +++ b/t/t3206-range-diff.sh @@@ -153,8 -150,21 +153,21 @@@ test_expect_success 'simple A B C (unmo test_cmp expect actual ' + test_expect_success 'A^! and A^- (unmodified)' ' + git range-diff --no-color topic^! unmodified^-1 >actual && + cat >expect <<-EOF && + 1: $(test_oid t4) = 1: $(test_oid u4) s/12/B/ + EOF + test_cmp expect actual + ' + + test_expect_success 'A^{/..} is not mistaken for a range' ' + test_must_fail git range-diff topic^.. topic^{/..} 2>error && + test_i18ngrep "not a commit range" error + ' + test_expect_success 'trivial reordering' ' - git range-diff --no-color master topic reordered >actual && + git range-diff --no-color main topic reordered >actual && cat >expect <<-EOF && 1: $(test_oid t1) = 1: $(test_oid r1) s/5/A/ 3: $(test_oid t3) = 2: $(test_oid r2) s/11/B/