3 # Copyright (c) 2009, Junio C Hamano
6 test_description
='log family learns --stdin'
11 for cmd
in rev-list
"log --stat"
17 test_expect_success
"check $cmd $*" '
18 git $cmd $(cat input) >expect &&
19 git $cmd --stdin <input >actual &&
20 sed -e "s/^/input /" input &&
21 sed -e "s/^/output /" expect &&
22 test_cmp expect actual
29 test_expect_success setup
'
35 echo $i.$j >file-$j &&
36 git add file-$j || exit
39 git commit -m $i || exit
43 git checkout -b side-$i master~$i &&
44 echo updated $i >file-$i &&
47 git commit -m side-$i || exit
54 check side-1 ^side-7
--
55 check side-1 ^side-7
-- file-1
56 check side-1 ^side-7
-- file-2
57 check side-3 ^side-4
-- file-3
59 check side-3 ^side-2
-- file-1
61 test_expect_success
'not only --stdin' '
73 git log --pretty=tformat:%s --name-only --stdin master -- file-1 \
75 test_cmp expect actual