Merge branch 'mh/ref-lock-entry'

The code to acquire a lock on a reference (e.g. while accepting a
push from a client) used to immediately fail when the reference is
already locked---now it waits for a very short while and retries,
which can make it succeed if the lock holder was holding it during
a read-only operation.

* mh/ref-lock-entry:
  refs: retry acquiring reference locks for 100ms
This commit is contained in:
Junio C Hamano
2017-08-26 22:55:09 -07:00
4 changed files with 39 additions and 5 deletions

View File

@ -61,6 +61,12 @@
*/
#define REF_DELETED_LOOSE 0x200
/*
* Return the length of time to retry acquiring a loose reference lock
* before giving up, in milliseconds:
*/
long get_files_ref_lock_timeout_ms(void);
/*
* Return true iff refname is minimally safe. "Safe" here means that
* deleting a loose reference by this name will not do any damage, for