]>
Commit | Line | Data |
---|---|---|
7ecee331 JH |
1 | #!/bin/sh |
2 | ||
3 | test_description='git pull message generation' | |
4 | ||
ece3974b | 5 | TEST_PASSES_SANITIZE_LEAK=true |
7ecee331 JH |
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 && | |
5061a44b PT |
21 | echo "second" >afile && |
22 | git add afile && | |
23 | git commit -m "second commit" && | |
7ecee331 JH |
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 && | |
031e2f7a | 32 | git pull --no-rebase --log && |
7ecee331 JH |
33 | git log -2 && |
34 | git cat-file commit HEAD >result && | |
35 | grep Dollar result | |
36 | ) | |
37 | ' | |
38 | ||
5061a44b PT |
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 && | |
031e2f7a | 45 | git pull --no-rebase --log=1 && |
5061a44b PT |
46 | git log -3 && |
47 | git cat-file commit HEAD >result && | |
48 | grep Dollar result && | |
49 | ! grep "second commit" result | |
50 | ) | |
51 | ' | |
52 | ||
7ecee331 | 53 | test_done |