summaryrefslogtreecommitdiff
path: root/refs/refs-internal.h
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-08-26 22:55:09 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-08-26 22:55:09 -0700
commitf2dd90fc1c38ce1d1ebf626e39ddafad130875ae (patch)
treeefa2f719a8aa9c64c394d4ef78a02b40300cb25c /refs/refs-internal.h
parentMerge branch 'jt/doc-pack-objects-fix' (diff)
parentrefs: retry acquiring reference locks for 100ms (diff)
downloadtgif-f2dd90fc1c38ce1d1ebf626e39ddafad130875ae.tar.xz
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
Diffstat (limited to 'refs/refs-internal.h')
-rw-r--r--refs/refs-internal.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/refs/refs-internal.h b/refs/refs-internal.h
index 4789106fc0..b02dc5a7e3 100644
--- a/refs/refs-internal.h
+++ b/refs/refs-internal.h
@@ -62,6 +62,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
* example by causing a file that is not a reference to be deleted.