Skip to content

Commit 0ce11fe

Browse files
rscharfegitster
authored andcommitted
checkout: convert post_checkout_hook() to struct object_id
Signed-off-by: Rene Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8694769 commit 0ce11fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

builtin/checkout.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ static int post_checkout_hook(struct commit *old, struct commit *new,
5656
int changed)
5757
{
5858
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),
6161
changed ? "1" : "0", NULL);
6262
/* "new" can be NULL when checking out from the index before
6363
a commit exists. */

0 commit comments

Comments
 (0)