diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-05-10 18:16:25 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-05-10 18:16:25 -0700 |
commit | 2855e70ad11abf7e7f30f975b063bd60d5abdf4f (patch) | |
tree | 62c02c9ba89da45a68df017332c27c281384285d /t | |
parent | 380a7426794dcad369dd48519cd01d6e0246cde5 (diff) | |
parent | 050288d52dc5dc3f6c7716007c1069dd9f59feb7 (diff) | |
download | git-2855e70ad11abf7e7f30f975b063bd60d5abdf4f.tar.gz git-2855e70ad11abf7e7f30f975b063bd60d5abdf4f.tar.xz |
Merge branch 'py/diff-submodule'
* 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 directory
Diffstat (limited to 't')
-rwxr-xr-x | t/t4027-diff-submodule.sh | 7 | ||||
-rwxr-xr-x | t/t7506-status-submodule.sh | 38 |
2 files changed, 45 insertions, 0 deletions
diff --git a/t/t4027-diff-submodule.sh b/t/t4027-diff-submodule.sh index 1fd3fb74d..ba6679c6e 100755 --- a/t/t4027-diff-submodule.sh +++ b/t/t4027-diff-submodule.sh @@ -50,4 +50,11 @@ test_expect_success 'git diff-files --raw' ' test_cmp expect actual.files ' +test_expect_success 'git diff (empty submodule dir)' ' + : >empty && + rm -rf sub/* sub/.git && + git diff > actual.empty && + test_cmp empty actual.empty +' + test_done diff --git a/t/t7506-status-submodule.sh b/t/t7506-status-submodule.sh new file mode 100755 index 000000000..a75130cdb --- /dev/null +++ b/t/t7506-status-submodule.sh @@ -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 |