Skip to content

Commit d299e9e

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5d7c37a commit d299e9e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

t/t4013-diff-various.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,4 +324,14 @@ test_expect_success 'diff --cached -- file on unborn branch' '
324324
test_cmp "$TEST_DIRECTORY/t4013/diff.diff_--cached_--_file0" result
325325
'
326326

327+
test_expect_success 'diff-tree --stdin with log formatting' '
328+
cat >expect <<-\EOF &&
329+
Side
330+
Third
331+
Second
332+
EOF
333+
git rev-list master | git diff-tree --stdin --format=%s -s >actual &&
334+
test_cmp expect actual
335+
'
336+
327337
test_done

0 commit comments

Comments
 (0)