cache: add a function to read an object ID from a buffer
authorbrian m. carlson <sandals@crustytoothpaste.net>
Wed, 2 May 2018 00:25:29 +0000 (00:25 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 May 2018 04:59:48 +0000 (13:59 +0900)
commit69d124255ede771ff8162652762406c55ba491c0
tree3249ee68c31622d295b8086a435acffe8441d045
parentfe0a9eaf31dd0c349ae4308498c33a5c3794b293
cache: add a function to read an object ID from a buffer

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.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache-tree.c
cache.h
resolve-undo.c