summaryrefslogtreecommitdiff
path: root/builtin/cat-file.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2013-07-12 06:32:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-07-12 17:14:06 (GMT)
commit412916ee131cf8b0aaac96313ce8686aebe3a47a (patch)
tree797ed05d320bdee54e631d070bae7f118f71b679 /builtin/cat-file.c
parent90191d37ab08f7c6810fa22804dedb23bade02a1 (diff)
downloadgit-412916ee131cf8b0aaac96313ce8686aebe3a47a.zip
git-412916ee131cf8b0aaac96313ce8686aebe3a47a.tar.gz
git-412916ee131cf8b0aaac96313ce8686aebe3a47a.tar.bz2
packed_object_info: make type lookup optional
Currently, packed_object_info can save some work by not calculating the size or disk_size of the object if the caller is not interested. However, it always calculates the true object type, whether the caller cares or not, and only optionally returns the easy-to-get "representation type". Let's swap these types. The function will now return the representation type (or OBJ_BAD on failure), and will only optionally fill in the true type. There should be no behavior change yet, as the only caller, sha1_object_info_extended, will always feed it a type pointer. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/cat-file.c')
0 files changed, 0 insertions, 0 deletions