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 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 "static" from here,

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

2013-08-31 Thread Junio C Hamano
Brad King 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 > --- > refs.c | 28

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

2013-08-30 Thread Brad King
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 --- refs.c | 28 +++- 1 file changed,