git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] checkout: convert post_checkout_hook() to struct object_id

From
René Scharfe <l.s.r@web.de>
Date
Jan 28, 2017, 22:14 UTC
Message-ID
<b30e5d34-436a-af5f-dbad-b1df464bf303@web.de>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
---
 builtin/checkout.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/checkout.c b/builtin/checkout.c
index bfe685c198..80d5e38981 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. */
-- 
2.11.0
Next: Johannes Schindelin
Message 1 of 3 in “checkout: convert post_checkout_hook() to struct object_id”
  1. checkout: convert post_checkout_hook() to struct object_idRené Scharfe, Jan 28, 2017
  2. Johannes SchindelinJan 30, 2017
  3. brian m. carlsonJan 30, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.