2008-05-02 21:35:34 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2008-09-03 16:59:33 +08:00
|
|
|
test_description='git status for submodule'
|
2008-05-02 21:35:34 +08:00
|
|
|
|
|
|
|
. ./test-lib.sh
|
|
|
|
|
|
|
|
test_expect_success 'setup' '
|
|
|
|
test_create_repo sub
|
|
|
|
cd sub &&
|
|
|
|
: >bar &&
|
|
|
|
git add bar &&
|
|
|
|
git commit -m " Add bar" &&
|
|
|
|
cd .. &&
|
|
|
|
git add sub &&
|
|
|
|
git commit -m "Add submodule sub"
|
|
|
|
'
|
|
|
|
|
|
|
|
test_expect_success 'status clean' '
|
|
|
|
git status |
|
|
|
|
grep "nothing to commit"
|
|
|
|
'
|
|
|
|
test_expect_success 'status -a clean' '
|
|
|
|
git status -a |
|
|
|
|
grep "nothing to commit"
|
|
|
|
'
|
|
|
|
test_expect_success 'rm submodule contents' '
|
|
|
|
rm -rf sub/* sub/.git
|
|
|
|
'
|
|
|
|
test_expect_success 'status clean (empty submodule dir)' '
|
|
|
|
git status |
|
|
|
|
grep "nothing to commit"
|
|
|
|
'
|
2008-05-04 08:24:28 +08:00
|
|
|
test_expect_success 'status -a clean (empty submodule dir)' '
|
2008-05-02 21:35:34 +08:00
|
|
|
git status -a |
|
|
|
|
grep "nothing to commit"
|
|
|
|
'
|
|
|
|
|
|
|
|
test_done
|