Browse Source
* py/diff-submodule: is_racy_timestamp(): do not check timestamp for gitlinks diff-lib.c: rename check_work_tree_entity() diff: a submodule not checked out is not modified Add t7506 to test submodule related functions for git-status t4027: test diff for submodule with empty directorymaint
Junio C Hamano
17 years ago
4 changed files with 73 additions and 8 deletions
@ -0,0 +1,38 @@
@@ -0,0 +1,38 @@
|
||||
#!/bin/sh |
||||
|
||||
test_description='git-status for submodule' |
||||
|
||||
. ./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" |
||||
' |
||||
test_expect_success 'status -a clean (empty submodule dir)' ' |
||||
git status -a | |
||||
grep "nothing to commit" |
||||
' |
||||
|
||||
test_done |
Loading…
Reference in new issue