lock_ref_sha1_basic(): if locking fails with ENOENT, retry
commite5c223e98b985d9faa274039aefa4391d2da25a6
authorMichael Haggerty <mhagger@alum.mit.edu>
Sat, 18 Jan 2014 22:48:55 +0000 (18 23:48 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 21 Jan 2014 21:46:30 +0000 (21 13:46 -0800)
tree30c86f94026bed250aa888d6b81ea414cba9fcfb
parentc4c61c763e700d02344490590d6980ee51031a27
lock_ref_sha1_basic(): if locking fails with ENOENT, retry

If hold_lock_file_for_update() fails with errno==ENOENT, it might be
because somebody else (for example, a pack-refs process) has just
deleted one of the lockfile's ancestor directories.  So if this
condition is detected, try again (up to 3 times).

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c