| 1197 | }; |
| 1198 | |
| 1199 | static 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. |
nothing calls this directly
no test coverage detected