git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] checkout: convert post_checkout_hook() to struct object_id
@ 2017-01-28 22:14 René Scharfe
  2017-01-30 13:01 ` Johannes Schindelin
  0 siblings, 1 reply; 3+ messages in thread
From: René Scharfe @ 2017-01-28 22:14 UTC (permalink / raw)
  To: Git List; +Cc: Junio C Hamano, brian m. carlson

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] checkout: convert post_checkout_hook() to struct object_id
  2017-01-28 22:14 [PATCH] checkout: convert post_checkout_hook() to struct object_id René Scharfe
@ 2017-01-30 13:01 ` Johannes Schindelin
  2017-01-30 22:48   ` brian m. carlson
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Schindelin @ 2017-01-30 13:01 UTC (permalink / raw)
  To: René Scharfe; +Cc: Git List, Junio C Hamano, brian m. carlson

[-- Attachment #1: Type: text/plain, Size: 180 bytes --]

Hi René,

On Sat, 28 Jan 2017, René Scharfe wrote:

> Signed-off-by: Rene Scharfe <l.s.r@web.de>

These three SHA-1 -> OID patches all appear correct to me.

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] checkout: convert post_checkout_hook() to struct object_id
  2017-01-30 13:01 ` Johannes Schindelin
@ 2017-01-30 22:48   ` brian m. carlson
  0 siblings, 0 replies; 3+ messages in thread
From: brian m. carlson @ 2017-01-30 22:48 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: René Scharfe, Git List, Junio C Hamano

[-- Attachment #1: Type: text/plain, Size: 456 bytes --]

On Mon, Jan 30, 2017 at 02:01:12PM +0100, Johannes Schindelin wrote:
> Hi René,
> 
> On Sat, 28 Jan 2017, René Scharfe wrote:
> 
> > Signed-off-by: Rene Scharfe <l.s.r@web.de>
> 
> These three SHA-1 -> OID patches all appear correct to me.

I concur.  These look good.
-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | https://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: https://keybase.io/bk2204

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 868 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-01-30 22:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-28 22:14 [PATCH] checkout: convert post_checkout_hook() to struct object_id René Scharfe
2017-01-30 13:01 ` Johannes Schindelin
2017-01-30 22:48   ` brian m. carlson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).