From: Ben Peart Date: Fri, 21 Jul 2017 16:27:03 GMT Subject: Re: [RFC PATCH v2 4/4] sha1_file: support promised object hook Message-ID: In-Reply-To: <20170720141804.22cdd2bf@twelve2.svl.corp.google.com> On 7/20/2017 5:18 PM, Jonathan Tan wrote: > On Thu, 20 Jul 2017 16:58:16 -0400 > Ben Peart wrote: > >>>> This is meant as a temporary measure to ensure that all Git commands >>>> work in such a situation. Future patches will update some commands to >>>> either tolerate promised objects (without invoking the hook) or be more >>>> efficient in invoking the promised objects hook. >> >> I agree that making git more tolerant of promised objects if possible >> and precomputing a list of promised objects required to complete a >> particular command and downloading them with a single request are good >> optimizations to add over time. > > That's good to know! > >> has_sha1_file also takes a hash "whether local or in an alternate object >> database, and whether packed or loose" but never calls >> sha1_object_info_extended. As a result, we had to add support in >> check_and_freshen to download missing objects to get proper behavior in >> all cases. I don't think this will work correctly without it. > > Thanks for the attention to detail. Is this before or after commit > e83e71c ("sha1_file: refactor has_sha1_file_with_flags", 2017-06-26)? > Sorry, my bad. I missed the comment in the cover letter that said this needed to be applied on top of your other patch series.