@matheusbsbs / matheus-bagliano / commits / 6c5c62f340
Fork 0

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>

Fernando J. Pereda committed Feb 15, 2006 at 12:37 UTC 6c5c62f3401dc8f4b567af46582c112f6a859b5e
2 files changed +8 -1
Makefile
+1
@@ -419,6 +419,7 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
419 rm -f $@
420 sed -e '1s|#!.*/sh|#!$(call shq,$(SHELL_PATH))|' \
421 -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
422 + -e 's/@@NO_CURL@@/$(NO_CURL)/g' \
423 $@.sh >$@
424 chmod +x $@
425
git-clone.sh
+7 -1
@@ -206,7 +206,13 @@ yes,yes)
206 fi
207 ;;
208 http://*)
209 - clone_dumb_http "$repo" "$D"
209 + if test -z "@@NO_CURL@@"
210 + then
211 + clone_dumb_http "$repo" "$D"
212 + else
213 + echo >&2 "http transport not supported, rebuild Git with curl support"
214 + exit 1
215 + fi
216 ;;
217 *)
218 cd "$D" && case "$upload_pack" in