Re: [PATCH 2/3] tag: die when listing missing or corrupt objects
- From
Jeff King <peff@peff.net>
- Date
- Feb 6, 2012, 08:38 UTC
- Message-ID
- <20120206083832.GA9425@sigill.intra.peff.net>
- In-Reply-To
- <7vfweo8ikq.fsf@alter.siamese.dyndns.org>
On Mon, Feb 06, 2012 at 12:36:05AM -0800, Junio C Hamano wrote:
Show 11 quoted lines
> > For that matter, shouldn't we make sure that the type is OBJ_TAG? It might > > make sense to allow OBJ_COMMIT (i.e. lightweight tag to a commit) as well, > > because the definition of "first N lines" is compatible between tag and > > commit for the purpose of the -n option. > > Ahh, Ok, your 3/3 addresses this exact issue. > > I do not object to silently return when the object is not OBJ_TAG (even > though I slightly prefer showing the first N lines of commit log contents > for OBJ_COMMIT lightweight tag), but I still think it should be warned > just like a corruption when we see (type == OBJ_TAG && !size).
OK, that's easy enough to do. Should we show lightweight tags to commits for backwards compatibility (and just drop the parse_signature junk in that case)? The showing of blobs or trees is the really bad thing, I think.
-Peff