git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Fail properly when cloning from invalid HTTP URL

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 7, 2008, 00:24 UTC
Message-ID
<7v63qdn03a.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1218067590-31590-1-git-send-email-pasky@suse.cz>
pasky@suse.cz writes:
Show 10 quoted lines
> diff --git a/transport.c b/transport.c
> index 6eb65b8..b88b89b 100644
> --- a/transport.c
> +++ b/transport.c
> @@ -464,16 +464,15 @@ static struct ref *get_refs_via_curl(struct transport *transport)
>  		if (results.curl_result != CURLE_OK) {
>  			strbuf_release(&buffer);
>  			if (missing_target(&results)) {
> +				die("%s not found: did you run git update-server-info on the server?", refs_url);
>  				return NULL;
Hmm, I do not see a deletion of a line here...

Everybody else in the get_refs_via_ family just die()s, and the caller of them do not notice nor treat NULL as anything special; I think your patch is a sensible thing to do.

Previous: pasky@suse.czNext: Daniel Barkalow
Message 2 of 3 in “Fail properly when cloning from invalid HTTP URL”
  1. Fail properly when cloning from invalid HTTP URLpasky@suse.cz, Aug 7, 2008
  2. Junio C HamanoAug 7, 2008
  3. Daniel BarkalowAug 7, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.