Re: [PATCH v2 24/25] register_ref(): make a copy of the bad reference SHA-1

2013-05-30 Thread Michael Haggerty
On 05/29/2013 06:53 PM, Junio C Hamano wrote: Michael Haggerty mhag...@alum.mit.edu writes: [...] +current_bad_sha1 = xmalloc(20); +hashcpy(current_bad_sha1, sha1); This, together with 18/25, may hint that we want hashdup()? I thought about it, but was surprised

Re: [PATCH v2 24/25] register_ref(): make a copy of the bad reference SHA-1

2013-05-30 Thread Philip Oakley
From: Michael Haggerty mhag...@alum.mit.edu Sent: Thursday, May 30, 2013 10:51 PM On 05/29/2013 06:53 PM, Junio C Hamano wrote: Michael Haggerty mhag...@alum.mit.edu writes: [...] + current_bad_sha1 = xmalloc(20); + hashcpy(current_bad_sha1, sha1); This, together with 18/25, may hint that we

[PATCH v2 24/25] register_ref(): make a copy of the bad reference SHA-1

2013-05-25 Thread Michael Haggerty
The lifetime of the sha1 parameter passed to an each_ref_fn callback is not guaranteed, so make a copy for later use. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- bisect.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bisect.c b/bisect.c index