build: fix git prereq check to not rely on being in a git directory (#21968)
[openwrt/openwrt.git] / include / prereq-build.mk
index bcb2103047906cebccbc14b23fb856555c00ef53..443b17399de7ec85e1eb84695e4a41a634e811aa 100644 (file)
@@ -154,8 +154,8 @@ $(eval $(call SetupHostCommand,python,Please install Python 2.x, \
 $(eval $(call SetupHostCommand,svn,Please install the Subversion client, \
        svn --version | grep Subversion))
 
-$(eval $(call SetupHostCommand,git,Please install Git (git-core) >= 1.6.5, \
-       git clone 2>&1 | grep -- --recursive))
+$(eval $(call SetupHostCommand,git,Please install Git (git-core) >= 1.7.12.2, \
+       git submodule --help 2>&1 | grep -q -- --recursive))
 
 $(eval $(call SetupHostCommand,file,Please install the 'file' package, \
        file --version 2>&1 | grep file))