Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:41:57

quoted
quoted
quoted
quoted
"PB" == Petr Baudis [off-list ref] writes:
quoted
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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help