summaryrefslogtreecommitdiff
path: root/pack-revindex.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2012-03-07 17:54:18 +0700
committerJunio C Hamano <gitster@pobox.com>2012-03-07 09:07:38 -0800
commit090ea12671b2971b1c613f0a3d2657e8cdd35134 (patch)
treef5a3fdf42e7baf22513bf7700de6693a4b4fe651 /pack-revindex.c
parent00c8fd493afbd1620febf2b895fb2365f76d5875 (diff)
downloadgit-090ea12671b2971b1c613f0a3d2657e8cdd35134.tar.gz
parse_object: avoid putting whole blob in core
Traditionally, all the callers of check_sha1_signature() first called read_sha1_file() to prepare the whole object data in core, and called this function. The function is used to revalidate what we read from the object database actually matches the object name we used to ask for the data from the object database. Update the API to allow callers to pass NULL as the object data, and have the function read and hash the object data using streaming API to recompute the object name, without having to hold everything in core at the same time. This is most useful in parse_object() that parses a blob object, because this caller does not have to keep the actual blob data around in memory after a "struct blob" is returned. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-revindex.c')
0 files changed, 0 insertions, 0 deletions