Skip to content

Commit

Permalink
Print an error if cloning a http repo and NO_CURL is set
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fernando J. Pereda authored and Junio C Hamano committed Feb 16, 2006
1 parent 504fe71 commit 6c5c62f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Expand Up @@ -419,6 +419,7 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
rm -f $@
sed -e '1s|#!.*/sh|#!$(call shq,$(SHELL_PATH))|' \
-e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
-e 's/@@NO_CURL@@/$(NO_CURL)/g' \
$@.sh >$@
chmod +x $@

Expand Down
8 changes: 7 additions & 1 deletion git-clone.sh
Expand Up @@ -206,7 +206,13 @@ yes,yes)
fi
;;
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
Expand Down

0 comments on commit 6c5c62f

Please sign in to comment.