Re: [PATCH 5/5] load_ref_decorations(): avoid parsing non-tag objects
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Jun 22, 2021, 16:35 UTC
- Message-ID
- <a93690bc-1d33-0fe0-5ca8-0e8baa9c66e6@gmail.com>
- In-Reply-To
- <YNILCDz3LpHX7OX0@coredump.intra.peff.net>
On 6/22/2021 12:08 PM, Jeff King wrote:
Show 5 quoted lines
> - obj = parse_object(the_repository, oid); > - if (!obj) > + objtype = oid_object_info(the_repository, oid, NULL); > + if (type < 0) > return 0;
Do you mean "if (objtype < 0)" here? There is a 'type' variable, but it is an enum decoration_type and I can't find a reason why it would be negative. oid_object_info() _does_ return -1 if there is a problem loading the object, so that would make sense.
This is the only question I had about the entire series. Everything else LGTM.
Thanks, -Stolee