Re: [PATCH v2 3/8] refs: factor update_ref steps into helpers

2013-09-02 Thread Brad King
On 09/01/2013 02:08 AM, Junio C Hamano wrote: Brad King brad.k...@kitware.com writes: static struct ref_lock *lock; Not the fault of this patch, as the original update_ref() had it this way, but it is not necessary to keep the value of this variable across invocations. Let's drop

Re: [PATCH v2 3/8] refs: factor update_ref steps into helpers

2013-09-01 Thread Junio C Hamano
Brad King brad.k...@kitware.com writes: Factor the lock and write steps and error handling into helper functions update_ref_lock and update_ref_write to allow later use elsewhere. Expose lock_any_ref_for_update's type_p to update_ref_lock callers. Signed-off-by: Brad King