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:
parent
f3670a5749
commit
496917b721
@ -59,7 +59,7 @@ resolve_relative_url ()
|
||||
#
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user