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>maint
parent
8694769f3c
commit
0ce11fe951
|
@ -56,8 +56,8 @@ static int post_checkout_hook(struct commit *old, struct commit *new,
|
||||||
int changed)
|
int changed)
|
||||||
{
|
{
|
||||||
return run_hook_le(NULL, "post-checkout",
|
return run_hook_le(NULL, "post-checkout",
|
||||||
sha1_to_hex(old ? old->object.oid.hash : null_sha1),
|
oid_to_hex(old ? &old->object.oid : &null_oid),
|
||||||
sha1_to_hex(new ? new->object.oid.hash : null_sha1),
|
oid_to_hex(new ? &new->object.oid : &null_oid),
|
||||||
changed ? "1" : "0", NULL);
|
changed ? "1" : "0", NULL);
|
||||||
/* "new" can be NULL when checking out from the index before
|
/* "new" can be NULL when checking out from the index before
|
||||||
a commit exists. */
|
a commit exists. */
|
||||||
|
|
Loading…
Reference in New Issue