2008-05-02 13:35:34 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2008-09-03 08:59:33 +00:00
|
|
|
test_description='git status for submodule'
|
2008-05-02 13:35:34 +00: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 00:24:28 +00:00
|
|
|
test_expect_success 'status -a clean (empty submodule dir)' '
|
2008-05-02 13:35:34 +00:00
|
|
|
git status -a |
|
|
|
|
grep "nothing to commit"
|
|
|
|
'
|
|
|
|
|
|
|
|
test_done
|