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

Re: [PATCH] Fix git-fsck-cache segfault on invalid tag

From
Junio C Hamano <junkio@cox.net>
Date
May 20, 2005, 13:58 UTC
Message-ID
<7voeb6uhhs.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20050520085047.GA27787@pasky.ji.cz>
>>>>> "PB" == Petr Baudis <pasky@ucw.cz> writes:
Show 6 quoted lines
>> obj = lookup_object(sha1);
>> +	if (!obj) {
>> +		fprintf(stderr, "invalid tag %s - %s\n", path, hexname);
>> +		return;
>> +	}
>> ...

PB> My error message is PB> error("%s: invalid sha1 pointer %.40s", path, hexname); PB> I'd prefer that (at least use the error() call).

Ack.

I was about to say "doesn't lookup_object() give its own error message before you say that, though?" because I remembered a comment to that effect around ll 410 that gets the heads from the command line argument, and then looked at lookup_object() implementation to find that it does _not_ give error message.

So if you are going to do this, would you mind giving similar error message to that command line heads stuff while you are at it, please?

Previous: Petr BaudisNext: Frank Sorenson
Message 3 of 4 in “Fix git-fsck-cache segfault on invalid tag”
  1. Fix git-fsck-cache segfault on invalid tagFrank Sorenson, May 20, 2005
  2. Petr BaudisMay 20, 2005
  3. Junio C HamanoMay 20, 2005
  4. Frank SorensonMay 20, 2005

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.