Re: [PATCH v2 34/36] Convert lookup_replace_object to struct object_id
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Feb 26, 2018, 11:37 UTC
- Message-ID
- <CACsJy8BcFVVjvfrqot5mTv4+zKx_GnRQ_vsiyXvKkYvWVnS0LA@mail.gmail.com>
- In-Reply-To
- <20180225211212.477570-35-sandals@crustytoothpaste.net>
On Mon, Feb 26, 2018 at 4:12 AM, brian m. carlson <sandals@crustytoothpaste.net> wrote:
Show 14 quoted lines
> diff --git a/sha1_file.c b/sha1_file.c > index 7493bc7f11..c41fbe2f01 100644 > --- a/sha1_file.c > +++ b/sha1_file.c > @@ -1227,22 +1227,18 @@ int oid_object_info_extended(const struct object_id *oid, struct object_info *oi > static struct object_info blank_oi = OBJECT_INFO_INIT; > struct pack_entry e; > int rtype; > - const unsigned char *real = (flags & OBJECT_INFO_LOOKUP_REPLACE) ? > - lookup_replace_object(oid->hash) : > - oid->hash; > + const struct object_id *real = (flags & OBJECT_INFO_LOOKUP_REPLACE) ? > + lookup_replace_object(oid) : > + oid;
Micro nit. Perhaps we should replace "? :" with a real "if" construct
-- Duy