MCPcopy Index your code
hub / github.com/git/git / check_locks

Function check_locks

http-push.c:484–504  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

482}
483
484static void check_locks(void)
485{
486 struct remote_lock *lock = repo->locks;
487 time_t current_time = time(NULL);
488 int time_remaining;
489
490 while (lock) {
491 time_remaining = lock->start_time + lock->timeout -
492 current_time;
493 if (!lock->refreshing && time_remaining < LOCK_REFRESH) {
494 if (!refresh_lock(lock)) {
495 fprintf(stderr,
496 "Unable to refresh lock for %s\n",
497 lock->url);
498 aborted = 1;
499 return;
500 }
501 }
502 lock = lock->next;
503 }
504}
505
506static void release_request(struct transfer_request *request)
507{

Callers 4

finish_requestFunction · 0.85
add_fetch_requestFunction · 0.85
add_send_requestFunction · 0.85
cmd_mainFunction · 0.85

Calls 1

refresh_lockFunction · 0.85

Tested by

no test coverage detected