summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2014-07-28 14:01:57 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-07-28 11:31:32 -0700
commitd299e9e550c1bf8640907fdba1f03cc585ee71df (patch)
tree6b8a09a598b28e0d006715e60d1b1383b0bf4a2c /t
parentMerge branch 'jk/alloc-commit-id-maint' into maint (diff)
downloadtgif-d299e9e550c1bf8640907fdba1f03cc585ee71df.tar.xz
t4013: test diff-tree's --stdin commit formatting
Once upon a time, git-log was just "rev-list | diff-tree", and we did not bother to test it separately. These days git-log is implemented internally, but we want to make sure that the rev-list to diff-tree pipeline continues to function. Let's add a basic sanity test. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t4013-diff-various.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh
index e77c09c37e..f7a9af893b 100755
--- a/t/t4013-diff-various.sh
+++ b/t/t4013-diff-various.sh
@@ -324,4 +324,14 @@ test_expect_success 'diff --cached -- file on unborn branch' '
test_cmp "$TEST_DIRECTORY/t4013/diff.diff_--cached_--_file0" result
'
+test_expect_success 'diff-tree --stdin with log formatting' '
+ cat >expect <<-\EOF &&
+ Side
+ Third
+ Second
+ EOF
+ git rev-list master | git diff-tree --stdin --format=%s -s >actual &&
+ test_cmp expect actual
+'
+
test_done