status: update short status to respect --no-ahead-behind
[gitweb.git] / t / t7400-submodule-basic.sh
index c2706fe4723778b68b9673fd85267ea475f791f2..a39e69a3ebd1c39ddf8feb861f8a39c8315aa7f8 100755 (executable)
@@ -38,14 +38,12 @@ test_expect_success 'submodule update aborts on missing .gitmodules file' '
        test_i18ngrep "Submodule path .sub. not initialized" actual
 '
 
-test_expect_success 'configuration parsing' '
+test_expect_success 'submodule update aborts on missing gitmodules url' '
+       test_when_finished "git update-index --remove sub" &&
+       git update-index --add --cacheinfo 160000,$(git rev-parse HEAD),sub &&
        test_when_finished "rm -f .gitmodules" &&
-       cat >.gitmodules <<-\EOF &&
-       [submodule "s"]
-               path
-               ignore
-       EOF
-       test_must_fail git status
+       git config -f .gitmodules submodule.s.path sub &&
+       test_must_fail git submodule init
 '
 
 test_expect_success 'setup - repository in init subdirectory' '
@@ -273,7 +271,7 @@ test_expect_success 'submodule add with ./, /.. and // in path' '
        test_cmp empty untracked
 '
 
-test_expect_success 'submodule add with \\ in path' '
+test_expect_success !CYGWIN 'submodule add with \\ in path' '
        test_when_finished "rm -rf parent sub\\with\\backslash" &&
 
        # Initialize a repo with a backslash in its name
@@ -1213,7 +1211,7 @@ test_expect_success 'clone --recurse-submodules with a pathspec works' '
 
        git clone --recurse-submodules="sub0" multisuper multisuper_clone &&
        git -C multisuper_clone submodule status |cut -c1,43- >actual &&
-       test_cmp actual expected
+       test_cmp expected actual
 '
 
 test_expect_success 'clone with multiple --recurse-submodules options' '
@@ -1281,4 +1279,10 @@ test_expect_success 'init properly sets the config' '
        test_must_fail git -C multisuper_clone config --get submodule.sub1.active
 '
 
+test_expect_success 'recursive clone respects -q' '
+       test_when_finished "rm -rf multisuper_clone" &&
+       git clone -q --recurse-submodules multisuper multisuper_clone >actual &&
+       test_must_be_empty actual
+'
+
 test_done