aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-08-25 14:46:43 -0700
committerJunio C Hamano <gitster@pobox.com>2009-08-25 14:46:43 -0700
commit079f298513f9875dfd9f2eaaacc58c294c546571 (patch)
tree3b8d0b544e33a4aeffd5b961e8971760b4a84679 /t
parentd6d994d9115ee7ce5bb5ffcfb75fea838174b9c4 (diff)
parentef92e1a43632c5b29b89da058f45d9c085ad18b7 (diff)
downloadgit-079f298513f9875dfd9f2eaaacc58c294c546571.tar.gz
git-079f298513f9875dfd9f2eaaacc58c294c546571.tar.xz
Merge branch 'jl/submodule-summary-diff-files'
* jl/submodule-summary-diff-files: Documentaqtion/git-submodule.txt: Typofix git submodule summary: add --files option
Diffstat (limited to 't')
-rwxr-xr-xt/t7401-submodule-summary.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/t/t7401-submodule-summary.sh b/t/t7401-submodule-summary.sh
index 61498293b..6cc16c39f 100755
--- a/t/t7401-submodule-summary.sh
+++ b/t/t7401-submodule-summary.sh
@@ -56,6 +56,15 @@ test_expect_success 'modified submodule(forward)' "
EOF
"
+test_expect_success 'modified submodule(forward), --files' "
+ git submodule summary --files >actual &&
+ diff actual - <<-EOF
+* sm1 $head1...$head2 (1):
+ > Add foo3
+
+EOF
+"
+
commit_file sm1 &&
cd sm1 &&
git reset --hard HEAD~2 >/dev/null &&
@@ -114,6 +123,15 @@ test_expect_success 'typechanged submodule(submodule->blob), --cached' "
EOF
"
+test_expect_success 'typechanged submodule(submodule->blob), --files' "
+ git submodule summary --files >actual &&
+ diff actual - <<-EOF
+* sm1 $head5(blob)->$head4(submodule) (3):
+ > Add foo5
+
+EOF
+"
+
rm -rf sm1 &&
git checkout-index sm1
test_expect_success 'typechanged submodule(submodule->blob)' "
@@ -205,4 +223,8 @@ test_expect_success '--for-status' "
EOF
"
+test_expect_success 'fail when using --files together with --cached' "
+ test_must_fail git submodule summary --files --cached
+"
+
test_done