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