git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Gerrit Pape <pape@smarden.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-clone: better error message if curl program is missing
Date: Fri, 07 Sep 2007 14:19:32 -0700	[thread overview]
Message-ID: <7vtzq62mxn.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 20070907171400.28590.qmail@d780fac1e27de6.315fe32.mid.smarden.org

Gerrit Pape <pape@smarden.org> writes:

> If the curl program is not available, and git clone is started to clone a
> repository through http, this is the output
>
>  Initialized empty Git repository in /tmp/puppet/.git/
>  /usr/bin/git-clone: line 37: curl: command not found

Perhaps we should die at this point so that...

>  Cannot get remote repository information.
>  Perhaps git-update-server-info needs to be run there?

the user does not have to see this.

In other words, instead of this:

>  http_fetch () {
>  	# $1 = Remote, $2 = Local
> +	type curl >/dev/null 2>&1 ||
> +	    die "The curl program is not available"
>  	curl -nsfL $curl_extra_args "$1" >"$2"
>  }

something like this, perhaps:

	http_fetch () {
        	# $1 = remote, $2 = local
               	curl -nsfL $curl_extra_args "$1" >"$2" || exit
	}

Then the shell would say "curl: command not found" and we would
stop.

I am just hestating to use "type" there (yeah, I know mergetool
has one but that one is not as close to the core of the workflow
as git-fetch is).

BTW, isn't it a packaging bug not to depend git-fetch on curl?

      reply	other threads:[~2007-09-07 21:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-07 17:13 [PATCH] git-clone: better error message if curl program is missing Gerrit Pape
2007-09-07 21:19 ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vtzq62mxn.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=pape@smarden.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).