提交 496917b7 编写于 作者: J Johannes Schindelin 提交者: Junio C Hamano

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: NJohannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 f3670a57
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册