diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-05-11 12:08:20 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-05-11 12:08:20 -0700 |
commit | dccb3a6acbb2e7c6a405fe67b6487aaee0cf1977 (patch) | |
tree | 936ed4d96eea5d08923a333560e53144c2f9d468 /t | |
parent | dfd1b749befcb581d84722caa6a3af56ce6526a5 (diff) | |
parent | c40641b77b0274186fd1b327d5dc3246f814aaaf (diff) | |
download | git-dccb3a6acbb2e7c6a405fe67b6487aaee0cf1977.tar.gz |
Merge branch 'lt/core-optim'
* lt/core-optim:
Optimize symlink/directory detection
Avoid some unnecessary lstat() calls
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
Make git-add behave more sensibly in a case-insensitive environment
When adding files to the index, add support for case-independent matches
Make unpack-tree update removed files before any updated files
Make branch merging aware of underlying case-insensitive filsystems
Add 'core.ignorecase' option
Make hash_name_lookup able to do case-independent lookups
Make "index_name_exists()" return the cache_entry it found
Move name hashing functions into a file of its own
Make unpack_trees_options bit flags actual bitfields
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 1fd3fb74d7..ba6679c6e4 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 0000000000..a75130cdbb --- /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 |