Re: [PATCH v4 5/8] sha1_file: refactor read_object

2017-06-21 Thread Junio C Hamano
Jonathan Tan writes: > @@ -2914,6 +2912,7 @@ static int sha1_loose_object_info(const unsigned char > *sha1, > git_zstream stream; > char hdr[32]; > struct strbuf hdrbuf = STRBUF_INIT; > + unsigned long size_scratch; > > if (oi->delta_base_sha1) > hashc

[PATCH v4 5/8] sha1_file: refactor read_object

2017-06-19 Thread Jonathan Tan
read_object() and sha1_object_info_extended() both implement mechanisms such as object replacement, retrying the packed store after failing to find the object in the packed store then the loose store, and being able to mark a packed object as bad and then retrying the whole process. Consolidating t