From: Jonathan Tan Date: Thu, 20 Jul 2017 21:18:04 GMT Subject: Re: [RFC PATCH v2 4/4] sha1_file: support promised object hook Message-ID: <20170720141804.22cdd2bf@twelve2.svl.corp.google.com> In-Reply-To: <75d5c3cd-c1d7-f06a-fc7e-894cde95afa7@gmail.com> 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)?