Merge branch 'du/rev-parse-is-plumbing' into maint
[git.git] / t / t5524-pull-msg.sh
blobc278adaa5a2556327a820cdeb98943b58d1e429f
1 #!/bin/sh
3 test_description='git pull message generation'
5 . ./test-lib.sh
7 dollar='$Dollar'
9 test_expect_success setup '
10 test_commit initial afile original &&
11 git clone . cloned &&
13 cd cloned &&
14 echo added >bfile &&
15 git add bfile &&
16 test_tick &&
17 git commit -m "add bfile"
18 ) &&
19 test_tick && test_tick &&
20 echo "second" >afile &&
21 git add afile &&
22 git commit -m "second commit" &&
23 echo "original $dollar" >afile &&
24 git add afile &&
25 git commit -m "do not clobber $dollar signs"
28 test_expect_success pull '
30 cd cloned &&
31 git pull --log &&
32 git log -2 &&
33 git cat-file commit HEAD >result &&
34 grep Dollar result
38 test_expect_success '--log=1 limits shortlog length' '
40 cd cloned &&
41 git reset --hard HEAD^ &&
42 test "$(cat afile)" = original &&
43 test "$(cat bfile)" = added &&
44 git pull --log=1 &&
45 git log -3 &&
46 git cat-file commit HEAD >result &&
47 grep Dollar result &&
48 ! grep "second commit" result
52 test_done