Code

MinGW: GCC >= 4 does not need SNPRINTF_SIZE_CORR anymore
[git.git] / t / t7400-submodule-basic.sh
index 21c19a28cfdcef1478a97168cae8b6d6cae597a1..0f2ccc6cf0123951d9bdbb880931868f29de5b4e 100755 (executable)
@@ -64,6 +64,16 @@ test_expect_success 'submodule add' '
        )
 '
 
+test_expect_success 'submodule add --branch' '
+       (
+               cd addtest &&
+               git submodule add -b initial "$submodurl" submod-branch &&
+               git submodule init &&
+               cd submod-branch &&
+               git branch | grep initial
+       )
+'
+
 test_expect_success 'submodule add with ./ in path' '
        (
                cd addtest &&
@@ -283,4 +293,17 @@ test_expect_success 'gracefully add submodule with a trailing slash' '
 
 '
 
+test_expect_success 'ls-files gracefully handles trailing slash' '
+
+       test "init" = "$(git ls-files init/)"
+
+'
+
+test_expect_success 'submodule <invalid-path> warns' '
+
+       git submodule no-such-submodule 2> output.err &&
+       grep "^error: .*no-such-submodule" output.err
+
+'
+
 test_done