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

Re: [PATCH] Prevent git-upload-pack segfault if object cannot be found

From
Jonas Fonseca <fonseca@diku.dk>
Date
Feb 23, 2006, 00:34 UTC
Message-ID
<20060223003400.GA27800@diku.dk>
In-Reply-To
<7vr75vmcod.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote Wed, Feb 22, 2006:
Show 8 quoted lines
> @@ -552,7 +563,9 @@ static void prepare_packed_git_one(char 
>  	len = strlen(path);
>  	dir = opendir(path);
>  	if (!dir) {
> -		fprintf(stderr, "unable to open object pack directory: %s: %s\n", path, strerror(errno));
> +		if (errno != ENOENT)
> +			error("unable to open object pack directory: %s: %s\n",
> +			      path, strerror(errno));
No need for the ending \n.
-- 
Jonas Fonseca
Previous: Carl WorthNext: Junio C Hamano
Message 7 of 8 in “Re: [PATCH] Prevent git-upload-pack segfault if object cannot be found”
  1. Andrew VasquezFeb 22, 2006
  2. Junio C HamanoFeb 22, 2006
  3. Carl WorthFeb 22, 2006
  4. Junio C HamanoFeb 22, 2006
  5. Junio C HamanoFeb 22, 2006
  6. Carl WorthFeb 22, 2006
  7. Jonas FonsecaFeb 23, 2006
  8. Give no terminating LF to error() function.Junio C Hamano, Feb 23, 2006

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.