MCPcopy Create free account
hub / github.com/git/git / create_reflock

Function create_reflock

refs/files-backend.c:1199–1205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1197};
1198
1199static int create_reflock(const char *path, void *cb)
1200{
1201 struct create_reflock_cb *data = cb;
1202 return hold_lock_file_for_update_timeout(
1203 data->lk, path, LOCK_NO_DEREF,
1204 get_files_ref_lock_timeout_ms(data->repo)) < 0 ? -1 : 0;
1205}
1206
1207/*
1208 * Locks a ref returning the lock on success and NULL on failure.

Callers

nothing calls this directly

Tested by

no test coverage detected