From: brian m. carlson Date: Tue, 10 Nov 2015 02:22:26 +0000 (+0000) Subject: object: introduce get_object_hash macro. X-Git-Tag: v2.7.0-rc0~4^2~4 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/3c4270107fec2c1d85b7b1a6f8b0aeebf3193b28?hp=--cc object: introduce get_object_hash macro. This macro is a temporary change to ease the transition of struct object to use struct object_id. It takes an argument of struct object and returns the object's hash. Provide this hash next to struct object for easier conversion. Signed-off-by: brian m. carlson Signed-off-by: Jeff King --- 3c4270107fec2c1d85b7b1a6f8b0aeebf3193b28 diff --git a/object.h b/object.h index 6416247def..7c098d031e 100644 --- a/object.h +++ b/object.h @@ -52,6 +52,8 @@ struct object { unsigned char sha1[20]; }; +#define get_object_hash(x) ((x).sha1) + extern const char *typename(unsigned int type); extern int type_from_string_gently(const char *str, ssize_t, int gentle); #define type_from_string(str) type_from_string_gently(str, -1, 0)