Skip to content

Commit 3c42701

Browse files
bk2204peff
authored andcommitted
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 <[email protected]> Signed-off-by: Jeff King <[email protected]>
1 parent 6f3d57b commit 3c42701

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

object.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ struct object {
5252
unsigned char sha1[20];
5353
};
5454

55+
#define get_object_hash(x) ((x).sha1)
56+
5557
extern const char *typename(unsigned int type);
5658
extern int type_from_string_gently(const char *str, ssize_t, int gentle);
5759
#define type_from_string(str) type_from_string_gently(str, -1, 0)

0 commit comments

Comments
 (0)