зеркало из https://github.com/microsoft/git.git
submodule: warn about non-submodules
Earlier, when you called git submodule some/bogus/path Git would silently ignore the path, without warning the user about the likely mistake. Now it does. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
f3670a5749
Коммит
496917b721
|
@ -59,7 +59,7 @@ resolve_relative_url ()
|
||||||
#
|
#
|
||||||
module_list()
|
module_list()
|
||||||
{
|
{
|
||||||
git ls-files --stage -- "$@" | grep '^160000 '
|
git ls-files --error-unmatch --stage -- "$@" | grep '^160000 '
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -240,4 +240,11 @@ test_expect_success 'ls-files gracefully handles trailing slash' '
|
||||||
|
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_expect_success 'submodule <invalid-path> warns' '
|
||||||
|
|
||||||
|
git submodule no-such-submodule 2> output.err &&
|
||||||
|
grep "^error: .*no-such-submodule" output.err
|
||||||
|
|
||||||
|
'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
|
Загрузка…
Ссылка в новой задаче