Print an error if cloning a http repo and NO_CURL is set
If Git is compiled with NO_CURL=YesPlease and one tries to clone a http repository, git-clone tries to call the curl binary. This trivial patch prints an error instead in such situation. Signed-off-by: Fernando J. Pereda <ferdy@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
504fe714fe
commit
6c5c62f340
1
Makefile
1
Makefile
@ -419,6 +419,7 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
|
|||||||
rm -f $@
|
rm -f $@
|
||||||
sed -e '1s|#!.*/sh|#!$(call shq,$(SHELL_PATH))|' \
|
sed -e '1s|#!.*/sh|#!$(call shq,$(SHELL_PATH))|' \
|
||||||
-e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
|
-e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
|
||||||
|
-e 's/@@NO_CURL@@/$(NO_CURL)/g' \
|
||||||
$@.sh >$@
|
$@.sh >$@
|
||||||
chmod +x $@
|
chmod +x $@
|
||||||
|
|
||||||
|
@ -206,7 +206,13 @@ yes,yes)
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
http://*)
|
http://*)
|
||||||
clone_dumb_http "$repo" "$D"
|
if test -z "@@NO_CURL@@"
|
||||||
|
then
|
||||||
|
clone_dumb_http "$repo" "$D"
|
||||||
|
else
|
||||||
|
echo >&2 "http transport not supported, rebuild Git with curl support"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
cd "$D" && case "$upload_pack" in
|
cd "$D" && case "$upload_pack" in
|
||||||
|
Loading…
Reference in New Issue
Block a user