Re: [PATCH 01/41] cache: add a function to read an object ID from a buffer
- From
- Martin Ågren <martin.agren@gmail.com>
- Date
- Apr 24, 2018, 09:39 UTC
- Message-ID
- <CAN0heSqvKbSiuNWhHte_HHT-wcewEjm1qVvSoYbZcUKMLT74ig@mail.gmail.com>
- In-Reply-To
- <20180423233951.276447-2-sandals@crustytoothpaste.net>
On 24 April 2018 at 01:39, brian m. carlson <sandals@crustytoothpaste.net> wrote:
> In various places throughout the codebase, we need to read data into a > struct object_id from a pack or other unsigned char buffer. Add an > inline function that does this based on the current hash algorithm in > use, and use it in several places.
Makes sense. Grepping for "memcpy.*hash" turns up a few instances that look similar, but not quite, so we would *not* want to do this conversion there, e.g., hashmap.h and notes.c.
Martin