summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorKarthik Nayak <karthik.188@gmail.com>2015-05-03 14:30:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-05-06 20:35:48 (GMT)
commit39e4ae388047bd7f6f3a4ad86ba5eba523dd0668 (patch)
treedf962960a6d1cb5f11a1fb4da8ecc5a1b03dd1a7 /Documentation
parentb48158ac94cf725834b70b4a5ab7f2d152a741d4 (diff)
downloadgit-39e4ae388047bd7f6f3a4ad86ba5eba523dd0668.zip
git-39e4ae388047bd7f6f3a4ad86ba5eba523dd0668.tar.gz
git-39e4ae388047bd7f6f3a4ad86ba5eba523dd0668.tar.bz2
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>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-cat-file.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/Documentation/git-cat-file.txt b/Documentation/git-cat-file.txt
index f6a16f4..499ae7b 100644
--- a/Documentation/git-cat-file.txt
+++ b/Documentation/git-cat-file.txt
@@ -9,7 +9,7 @@ git-cat-file - Provide content or type and size information for repository objec
SYNOPSIS
--------
[verse]
-'git cat-file' (-t | -s | -e | -p | <type> | --textconv ) <object>
+'git cat-file' (-t [--allow-unknown-type]| -s [--allow-unknown-type]| -e | -p | <type> | --textconv ) <object>
'git cat-file' (--batch | --batch-check) < <list-of-objects>
DESCRIPTION
@@ -69,6 +69,9 @@ OPTIONS
not be combined with any other options or arguments. See the
section `BATCH OUTPUT` below for details.
+--allow-unknown-type::
+ Allow -s or -t to query broken/corrupt objects of unknown type.
+
OUTPUT
------
If '-t' is specified, one of the <type>.