Thread (7 messages) 7 messages, 4 authors, 2016-06-15

Re: [PATCH v8 2/4] cat-file: teach cat-file a '--literally' option

From: Karthik Nayak <hidden>
Date: 2016-06-15 23:04:29

Possibly related (same subject, not in this thread)


On April 20, 2015 1:14:34 PM GMT+05:30, Charles Bailey [off-list ref] wrote:
quoted
On 20 Apr 2015, at 06:30, Junio C Hamano [off-list ref] wrote:
Charles Bailey [off-list ref] writes:
quoted
The option isn't a true opposite of hash-object's --literally
because
quoted
quoted
that also allows the creation of known types with invalid contents
(e.g.
quoted
quoted
corrupt trees) whereas cat-file is quite happy to show the
_contents_ of
quoted
quoted
such corrupt objects even without --literally.
Not really.  If you create an object with corrupt type string (e.g.
"BLOB"
quoted
instead of "blob"), cat-file would not be happy.
Sorry, the emphasis should have been on "complete" of "complete
opposite".  There are some types of bad objects that can be created
only
with hash-object --literally (malformed tag or tree), for which
cat-file
works with fine and there are other types (pun unintended - BLOB,
Sorry, but I didn't get you, broken objects created using hash-object --literally do not work with cat-file without the --literally option.
wobble, etc.) for which --literally/--unchecked is required with
cat-file.

So I meant that cat-file's --literally is only a partial "opposite" or
analogue of hash-object's.

--allow-invalid-types? --force (in the sense of "suppress some possible
errors")? It's not a big thing but I'm aware that if we can find a
better
name then now would be the best moment. If not, then --literally it is.
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help