Advertising

I'm OK with this, if it's the direction we want to go. But I thought the
discussion kind of ended as "we do not care about these warnings on
ancient versions of gcc; those people should use -Wno-error=uninitialized".
What version of gcc are you using? If it is the most recent thing
reasonably available on msysgit, then I am more sympathetic. But if it's
just an antique version of gcc, I am less so.
> An alternative solution may look like this (note: *untested*):
> [...]
> However, this would add an additional call to sha1_object_info()
Yeah, I don't think that is worth it.
> the "--batch" code path, with potential performance consequences
> (again untested). Also, if you are paranoid, I guess you should
> check that the (type,size) returned by sha1_object_info() was the
> same as that returned by read_sha1_file(). ;-)
I note that we do not actually check that contents != NULL after calling
read_sha1_file, either (nor that sha1_object_info does not return an
error). I suspect cat-file could segfault under the right conditions.
-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html