mergetool: Skip autoresolved paths
[git/mjg.git] / t / t5521-pull-options.sh
blob1b06691bb41586b3bc564841b720ce710f927a1c
1 #!/bin/sh
3 test_description='pull options'
5 . ./test-lib.sh
7 test_expect_success 'setup' '
8 mkdir parent &&
9 (cd parent && git init &&
10 echo one >file && git add file &&
11 git commit -m one)
14 test_expect_success 'git pull -q' '
15 mkdir clonedq &&
16 (cd clonedq && git init &&
17 git pull -q "../parent" >out 2>err &&
18 test ! -s err &&
19 test ! -s out)
22 test_expect_success 'git pull' '
23 mkdir cloned &&
24 (cd cloned && git init &&
25 git pull "../parent" >out 2>err &&
26 test -s err &&
27 test ! -s out)
30 test_expect_success 'git pull -v' '
31 mkdir clonedv &&
32 (cd clonedv && git init &&
33 git pull -v "../parent" >out 2>err &&
34 test -s err &&
35 test ! -s out)
38 test_expect_success 'git pull -v -q' '
39 mkdir clonedvq &&
40 (cd clonedvq && git init &&
41 git pull -v -q "../parent" >out 2>err &&
42 test ! -s out &&
43 test ! -s err)
46 test_expect_success 'git pull -q -v' '
47 mkdir clonedqv &&
48 (cd clonedqv && git init &&
49 git pull -q -v "../parent" >out 2>err &&
50 test ! -s out &&
51 test -s err)
54 test_expect_success 'git pull --force' '
55 mkdir clonedoldstyle &&
56 (cd clonedoldstyle && git init &&
57 cat >>.git/config <<-\EOF &&
58 [remote "one"]
59 url = ../parent
60 fetch = refs/heads/master:refs/heads/mirror
61 [remote "two"]
62 url = ../parent
63 fetch = refs/heads/master:refs/heads/origin
64 [branch "master"]
65 remote = two
66 merge = refs/heads/master
67 EOF
68 git pull two &&
69 test_commit A &&
70 git branch -f origin &&
71 git pull --all --force
75 test_expect_success 'git pull --all' '
76 mkdir clonedmulti &&
77 (cd clonedmulti && git init &&
78 cat >>.git/config <<-\EOF &&
79 [remote "one"]
80 url = ../parent
81 fetch = refs/heads/*:refs/remotes/one/*
82 [remote "two"]
83 url = ../parent
84 fetch = refs/heads/*:refs/remotes/two/*
85 [branch "master"]
86 remote = one
87 merge = refs/heads/master
88 EOF
89 git pull --all
93 test_done