summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-04-09 17:14:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-04-09 17:14:23 (GMT)
commit31df2c1019733ac22fc848aa2658a0e25af70a79 (patch)
treec4924fdd7bc01bbf9a1027a340110286b9a45b13 /t
parentac9e40e8ef796e43ae4438cbcd923bfa1056be61 (diff)
parent05314efaeaa0ae7cb0aa26d6347eabfe7cd8fc43 (diff)
downloadgit-31df2c1019733ac22fc848aa2658a0e25af70a79.zip
git-31df2c1019733ac22fc848aa2658a0e25af70a79.tar.gz
git-31df2c1019733ac22fc848aa2658a0e25af70a79.tar.bz2
Merge branch 'jk/line-log-with-patch'
"git log -L<from>,<to>:<path>" with "-s" did not suppress the patch output as it should. This has been corrected. * jk/line-log-with-patch: line-log: detect unsupported formats line-log: suppress diff output with "-s"
Diffstat (limited to 't')
-rwxr-xr-xt/t4211-line-log.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t4211-line-log.sh b/t/t4211-line-log.sh
index bd5fe4d..1db7bd0 100755
--- a/t/t4211-line-log.sh
+++ b/t/t4211-line-log.sh
@@ -115,4 +115,21 @@ test_expect_success 'range_set_union' '
git log $(for x in $(test_seq 200); do echo -L $((2*x)),+1:c.c; done)
'
+test_expect_success '-s shows only line-log commits' '
+ git log --format="commit %s" -L1,24:b.c >expect.raw &&
+ grep ^commit expect.raw >expect &&
+ git log --format="commit %s" -L1,24:b.c -s >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success '-p shows the default patch output' '
+ git log -L1,24:b.c >expect &&
+ git log -L1,24:b.c -p >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success '--raw is forbidden' '
+ test_must_fail git log -L1,24:b.c --raw
+'
+
test_done