Skip to content

Commit

Permalink
t4013: test diff-tree's --stdin commit formatting
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Jul 28, 2014
1 parent 5d7c37a commit d299e9e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions t/t4013-diff-various.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d299e9e

Please sign in to comment.