summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7c08a2a)
raw | patch | inline | side by side (parent: 7c08a2a)
author | Ping Yin <pkufranky@gmail.com> | |
Fri, 2 May 2008 13:35:34 +0000 (21:35 +0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 5 May 2008 00:41:27 +0000 (17:41 -0700) |
Signed-off-by: Ping Yin <pkufranky@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4027-diff-submodule.sh | patch | blob | history | |
t/t7506-status-submodule.sh | [new file with mode: 0755] | patch | blob |
index ba6679c6e4032bb12e4206226f95770946ece8cc..61caad0f5d4bea470226daf60780066abc99e5d3 100755 (executable)
test_cmp expect actual.files
'
-test_expect_success 'git diff (empty submodule dir)' '
+test_expect_failure 'git diff (empty submodule dir)' '
: >empty &&
rm -rf sub/* sub/.git &&
git diff > actual.empty &&
diff --git a/t/t7506-status-submodule.sh b/t/t7506-status-submodule.sh
--- /dev/null
@@ -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_failure 'status -a clean (empty submodule dir)' '
+ git status -a |
+ grep "nothing to commit"
+'
+
+test_done