cat-file: teach cat-file a '--allow-unknown-type' option
commit39e4ae388047bd7f6f3a4ad86ba5eba523dd0668
authorKarthik Nayak <karthik.188@gmail.com>
Sun, 3 May 2015 14:30:01 +0000 (3 20:00 +0530)
committerJunio C Hamano <gitster@pobox.com>
Wed, 6 May 2015 20:35:48 +0000 (6 13:35 -0700)
treedf962960a6d1cb5f11a1fb4da8ecc5a1b03dd1a7
parentb48158ac94cf725834b70b4a5ab7f2d152a741d4
cat-file: teach cat-file a '--allow-unknown-type' option

'git cat-file' throws an error while trying to print the type or
size of a broken/corrupt object. This is because these objects are
usually of unknown types.

Teach git cat-file a '--allow-unknown-type' option where it prints
the type or size of a broken/corrupt object without throwing
an error.

Modify '-t' and '-s' options to call sha1_object_info_extended()
directly to support the '--allow-unknown-type' option.

Add documentation for 'cat-file --allow-unknown-type'.

Helped-by: Junio C Hamano <gitster@pobox.com>
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
cat-file: add documentation for '--allow-unknown-type' option.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-cat-file.txt
builtin/cat-file.c