hash-object: add --literally option
commit5ba9a93b39bef057be54ecf7933386a582981625
authorJunio C Hamano <gitster@pobox.com>
Thu, 11 Sep 2014 20:14:51 +0000 (11 13:14 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 11 Sep 2014 21:23:51 +0000 (11 14:23 -0700)
treefba75dfc9afd84c57d2c338e32f64cb76b66822a
parent17b787f6031d72619e4e2982ea84f47fe161cb30
hash-object: add --literally option

This allows "hash-object --stdin" to just hash any garbage into a
"loose object" that may not pass the standard object parsing check
or fsck, so that different kind of corrupt objects we may encounter
in the field can be imitated in our test suite.  That would in turn
allow us to test features that catch these corrupt objects.

Note that "cat-file" may need to learn "--literally" option to allow
us peek into a truly broken object.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/hash-object.c