2008-11-15 08:14:24 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
test_description='pull options'
|
|
|
|
|
|
|
|
. ./test-lib.sh
|
|
|
|
|
|
|
|
test_expect_success 'setup' '
|
|
|
|
mkdir parent &&
|
|
|
|
(cd parent && git init &&
|
|
|
|
echo one >file && git add file &&
|
|
|
|
git commit -m one)
|
|
|
|
'
|
|
|
|
|
|
|
|
test_expect_success 'git pull -q' '
|
|
|
|
mkdir clonedq &&
|
2010-02-25 02:22:05 +08:00
|
|
|
(cd clonedq && git init &&
|
|
|
|
git pull -q "../parent" >out 2>err &&
|
|
|
|
test ! -s err &&
|
|
|
|
test ! -s out)
|
2008-11-15 08:14:24 +08:00
|
|
|
'
|
|
|
|
|
|
|
|
test_expect_success 'git pull' '
|
|
|
|
mkdir cloned &&
|
2010-02-25 02:22:05 +08:00
|
|
|
(cd cloned && git init &&
|
|
|
|
git pull "../parent" >out 2>err &&
|
|
|
|
test -s err &&
|
|
|
|
test ! -s out)
|
2008-11-15 08:14:24 +08:00
|
|
|
'
|
|
|
|
|
|
|
|
test_expect_success 'git pull -v' '
|
|
|
|
mkdir clonedv &&
|
2010-02-25 02:22:05 +08:00
|
|
|
(cd clonedv && git init &&
|
|
|
|
git pull -v "../parent" >out 2>err &&
|
|
|
|
test -s err &&
|
|
|
|
test ! -s out)
|
2008-11-15 08:14:24 +08:00
|
|
|
'
|
|
|
|
|
|
|
|
test_expect_success 'git pull -v -q' '
|
|
|
|
mkdir clonedvq &&
|
2010-02-25 02:22:05 +08:00
|
|
|
(cd clonedvq && git init &&
|
|
|
|
git pull -v -q "../parent" >out 2>err &&
|
|
|
|
test ! -s out &&
|
|
|
|
test ! -s err)
|
2008-11-15 08:14:24 +08:00
|
|
|
'
|
|
|
|
|
|
|
|
test_expect_success 'git pull -q -v' '
|
|
|
|
mkdir clonedqv &&
|
2010-02-25 02:22:05 +08:00
|
|
|
(cd clonedqv && git init &&
|
|
|
|
git pull -q -v "../parent" >out 2>err &&
|
|
|
|
test ! -s out &&
|
|
|
|
test -s err)
|
2008-11-15 08:14:24 +08:00
|
|
|
'
|
|
|
|
|
|
|
|
test_done
|