From: Junio C Hamano Date: Mon, 20 Apr 2015 05:30:02 GMT Subject: Re: [PATCH v8 2/4] cat-file: teach cat-file a '--literally' option Message-ID: In-Reply-To: <20150419002807.GA11634@hashpling.org> Charles Bailey writes: > I'm sorry to come in with such a fundamental question at such a late > revision of this patch series, but am I the only person to wonder about > the choice of option name? > > To me, cat-file already output objects "literally" (without -p) as > opposed to show. From the description, it feels more like it should be > "--unchecked" or perhaps something better that I haven't thought of? Yeah, it was conceived as a way to grok what hash-object --literally would create, but the operation by "cat-file --literally" is not about showing the contents literally without interpreting (the general "cat-file " does the literal output already). So it was my fault to suggest that name, but I do not think of a better alternative. > The option isn't a true opposite of hash-object's --literally because > that also allows the creation of known types with invalid contents (e.g. > corrupt trees) whereas cat-file is quite happy to show the _contents_ of > such corrupt objects even without --literally. Not really. If you create an object with corrupt type string (e.g. "BLOB" instead of "blob"), cat-file would not be happy.