From df7f915fb6fb28ea5a1e3103251c251e53a80b1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sim=C3=A3o=20Afonso?= Date: Wed, 25 Nov 2020 18:31:23 +0000 Subject: crendential-store: use timeout when locking file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When holding the lock for rewriting the credential file, use a timeout to avoid race conditions when the credentials file needs to be updated in parallel. An example would be doing `fetch --all` on a repository with several remotes that need credentials, using parallel fetching. The timeout can be configured using "credentialStore.lockTimeoutMS", defaulting to 1 second. Signed-off-by: Simão Afonso Signed-off-by: Junio C Hamano --- Documentation/config/credential.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Documentation') diff --git a/Documentation/config/credential.txt b/Documentation/config/credential.txt index 9d01641c28..512f31876e 100644 --- a/Documentation/config/credential.txt +++ b/Documentation/config/credential.txt @@ -28,3 +28,9 @@ credential..*:: credentialCache.ignoreSIGHUP:: Tell git-credential-cache--daemon to ignore SIGHUP, instead of quitting. + +credentialStore.lockTimeoutMS:: + The length of time, in milliseconds, for git-credential-store to retry + when trying to lock the credentials file. Value 0 means not to retry at + all; -1 means to try indefinitely. Default is 1000 (i.e., retry for + 1s). -- cgit v1.2.3