]> granicus.if.org Git - git/commitdiff
checkout: convert post_checkout_hook() to struct object_id
authorRené Scharfe <l.s.r@web.de>
Sat, 28 Jan 2017 22:14:29 +0000 (23:14 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 30 Jan 2017 22:23:43 +0000 (14:23 -0800)
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/checkout.c

index bfe685c198cd38b59ffe66fa6b3d3a7bced60824..80d5e389813bed951b63ae5bd8e4347af4da53df 100644 (file)
@@ -56,8 +56,8 @@ static int post_checkout_hook(struct commit *old, struct commit *new,
                              int changed)
 {
        return run_hook_le(NULL, "post-checkout",
-                          sha1_to_hex(old ? old->object.oid.hash : null_sha1),
-                          sha1_to_hex(new ? new->object.oid.hash : null_sha1),
+                          oid_to_hex(old ? &old->object.oid : &null_oid),
+                          oid_to_hex(new ? &new->object.oid : &null_oid),
                           changed ? "1" : "0", NULL);
        /* "new" can be NULL when checking out from the index before
           a commit exists. */