checkout: convert post_checkout_hook() to struct object_id
Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe committed
Jan 28, 2017 at 23:14 UTC
0ce11fe951e3a1ba73b940563a4227cf45461489
1 file changed
+2
-2
builtin/checkout.c
+2
-2
@@ -56,8 +56,8 @@ static int post_checkout_hook(struct commit *old, struct commit *new,
56
int changed)
57
{
58
return run_hook_le(NULL, "post-checkout",
59
- sha1_to_hex(old ? old->object.oid.hash : null_sha1),
60
- sha1_to_hex(new ? new->object.oid.hash : null_sha1),
59
+ oid_to_hex(old ? &old->object.oid : &null_oid),
60
+ oid_to_hex(new ? &new->object.oid : &null_oid),
61
changed ? "1" : "0", NULL);
62
/* "new" can be NULL when checking out from the index before
63
a commit exists. */