]> git.ipfire.org Git - thirdparty/git.git/commit
refs: factor update_ref steps into helpers
authorBrad King <brad.king@kitware.com>
Wed, 4 Sep 2013 15:22:40 +0000 (11:22 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 4 Sep 2013 18:08:36 +0000 (11:08 -0700)
commit4738a33338b837d4896b5e8d75e777f5e99a25cb
tree53cd1fc249c8e9c640c19aeb8edd0f0202152d8e
parent9bbb0fa1fdc6c413b1f35c26e090515e5d0096aa
refs: factor update_ref steps into helpers

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.

While at it, drop "static" from the local "lock" variable as it is not
necessary to keep across invocations.

Signed-off-by: Brad King <brad.king@kitware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c