Re: [PATCH] sha1-file: remove OBJECT_INFO_SKIP_CACHED
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Dec 31, 2019, 01:03 UTC
- Message-ID
- <20191231010303.GD13606@google.com>
- In-Reply-To
- <20191231003903.36486-1-jonathantanmy@google.com>
Jonathan Tan wrote:
> Jonathan Nieder wrote:
>> Hm, where does this dichotomy come from? E.g. is the latter a >> lower-level function used by the former? > > I don't know the reason for the dichotomy - perhaps it was an oversight.
Ah, that makes sense.
[...]
> This might be a moot point, but what do you mean by the > "'has_object_file || find_cached_object' pattern"?
Oh! Thanks, I should have been more precise. And calling it a pattern was probably overreaching --- I can only find one instance, in pretend_object_file:
if (has_object_file(oid) || find_cached_object(oid)) return 0;
Since there's only one, I was on the wrong track. (Except that with this change, that can indeed change to
if (has_object_file(oid)) return 0;
Thanks, Jonathan