]> git.ipfire.org Git - thirdparty/git.git/blob - t/t5524-pull-msg.sh
Merge branch 'jk/clone-allow-bare-and-o-together'
[thirdparty/git.git] / t / t5524-pull-msg.sh
1 #!/bin/sh
2
3 test_description='git pull message generation'
4
5 TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
7
8 dollar='$Dollar'
9
10 test_expect_success setup '
11 test_commit initial afile original &&
12 git clone . cloned &&
13 (
14 cd cloned &&
15 echo added >bfile &&
16 git add bfile &&
17 test_tick &&
18 git commit -m "add bfile"
19 ) &&
20 test_tick && test_tick &&
21 echo "second" >afile &&
22 git add afile &&
23 git commit -m "second commit" &&
24 echo "original $dollar" >afile &&
25 git add afile &&
26 git commit -m "do not clobber $dollar signs"
27 '
28
29 test_expect_success pull '
30 (
31 cd cloned &&
32 git pull --no-rebase --log &&
33 git log -2 &&
34 git cat-file commit HEAD >result &&
35 grep Dollar result
36 )
37 '
38
39 test_expect_success '--log=1 limits shortlog length' '
40 (
41 cd cloned &&
42 git reset --hard HEAD^ &&
43 test "$(cat afile)" = original &&
44 test "$(cat bfile)" = added &&
45 git pull --no-rebase --log=1 &&
46 git log -3 &&
47 git cat-file commit HEAD >result &&
48 grep Dollar result &&
49 ! grep "second commit" result
50 )
51 '
52
53 test_done