Make builtin-for-each-ref.c use parse-opts.
[git/git-p4.git] / t / t5520-pull.sh
blob93eaf2c1544b5374dbe8043c66478a0a80b0bb82
1 #!/bin/sh
3 test_description='pulling into void'
5 . ./test-lib.sh
7 D=`pwd`
9 test_expect_success setup '
11 echo file >file &&
12 git add file &&
13 git commit -a -m original
17 test_expect_success 'pulling into void' '
18 mkdir cloned &&
19 cd cloned &&
20 git init &&
21 git pull ..
24 cd "$D"
26 test_expect_success 'checking the results' '
27 test -f file &&
28 test -f cloned/file &&
29 diff file cloned/file
32 test_expect_success 'test . as a remote' '
34 git branch copy master &&
35 git config branch.copy.remote . &&
36 git config branch.copy.merge refs/heads/master &&
37 echo updated >file &&
38 git commit -a -m updated &&
39 git checkout copy &&
40 test `cat file` = file &&
41 git pull &&
42 test `cat file` = updated
45 test_expect_success 'the default remote . should not break explicit pull' '
46 git checkout -b second master^ &&
47 echo modified >file &&
48 git commit -a -m modified &&
49 git checkout copy &&
50 git reset --hard HEAD^ &&
51 test `cat file` = file &&
52 git pull . second &&
53 test `cat file` = modified
56 test_done