summaryrefslogtreecommitdiff
path: root/builtin/checkout.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2017-01-28 22:14:29 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-01-30 22:23:43 (GMT)
commit0ce11fe951e3a1ba73b940563a4227cf45461489 (patch)
tree7a1736d7af81573d870286c05cb39d7e410c6481 /builtin/checkout.c
parent8694769f3ce9e77994a67e3ff8973dfe01fbe37c (diff)
downloadgit-0ce11fe951e3a1ba73b940563a4227cf45461489.zip
git-0ce11fe951e3a1ba73b940563a4227cf45461489.tar.gz
git-0ce11fe951e3a1ba73b940563a4227cf45461489.tar.bz2
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>
Diffstat (limited to 'builtin/checkout.c')
-rw-r--r--builtin/checkout.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index bfe685c..80d5e38 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -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. */