{"thread":{"id":"3346","subject":"[PATCH] Print an error if cloning a http repo and NO_CURL is set","startedAt":"2006-02-15T11:37:30Z","lastAt":"2006-02-15T11:37:30Z","messageCount":1,"participants":["Fernando J. Pereda"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"16212","messageId":"20060215113730.GA12092@ferdyx.org","threadId":"3346","inReplyTo":null,"subject":"[PATCH] Print an error if cloning a http repo and NO_CURL is set","fromName":"Fernando J. Pereda","fromEmail":"ferdy@gentoo.org","sentAt":"2006-02-15T11:37:30Z","receivedAt":"2006-02-15T11:37:30Z","isPatch":true,"sender":{"key":"ferdy@gentoo.org","avatar":null},"body":"If Git is compiled with NO_CURL=YesPlease and one tries to\nclone a http repository, git-clone tries to call the curl\nbinary. This trivial patch prints an error instead in such\nsituation.\n\nSigned-off-by: Fernando J. Pereda <ferdy@gentoo.org>\n\n---\n\n Makefile     |    1 +\n git-clone.sh |    8 +++++++-\n 2 files changed, 8 insertions(+), 1 deletions(-)\n\n896d96a92a13848ccce19c2f3dee9b5570ef02a7\ndiff --git a/Makefile b/Makefile\nindex d40aa6a..648469e 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -419,6 +419,7 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.\n \trm -f $@\n \tsed -e '1s|#!.*/sh|#!$(call shq,$(SHELL_PATH))|' \\\n \t    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\n+\t    -e 's/@@NO_CURL@@/$(NO_CURL)/g' \\\n \t    $@.sh >$@\n \tchmod +x $@\n \ndiff --git a/git-clone.sh b/git-clone.sh\nindex 47f3ec9..e192b08 100755\n--- a/git-clone.sh\n+++ b/git-clone.sh\n@@ -206,7 +206,13 @@ yes,yes)\n \t\tfi\n \t\t;;\n \thttp://*)\n-\t\tclone_dumb_http \"$repo\" \"$D\"\n+\t\tif test -z \"@@NO_CURL@@\"\n+\t\tthen\n+\t\t\tclone_dumb_http \"$repo\" \"$D\"\n+\t\telse\n+\t\t\techo >&2 \"http transport not supported, rebuild Git with curl support\"\n+\t\t\texit 1\n+\t\tfi\n \t\t;;\n \t*)\n \t\tcd \"$D\" && case \"$upload_pack\" in\n-- \n1.2.0\n"}]}