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

Function commit_lock_file

lockfile.c:338–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

336}
337
338int commit_lock_file(struct lock_file *lk)
339{
340 char *result_path = get_locked_file_path(lk);
341
342 delete_tempfile(&lk->pid_tempfile);
343
344 if (commit_lock_file_to(lk, result_path)) {
345 int save_errno = errno;
346 free(result_path);
347 errno = save_errno;
348 return -1;
349 }
350 free(result_path);
351 return 0;
352}
353
354int rollback_lock_file(struct lock_file *lk)
355{

Callers 15

write_commit_graph_fileFunction · 0.85
write_messageFunction · 0.85
save_todoFunction · 0.85
safe_appendFunction · 0.85
write_update_refs_stateFunction · 0.85
create_bundleFunction · 0.85
write_midx_internalFunction · 0.85
write_rrFunction · 0.85
commit_shallow_fileFunction · 0.85

Calls 3

get_locked_file_pathFunction · 0.85
delete_tempfileFunction · 0.85
commit_lock_file_toFunction · 0.85

Tested by

no test coverage detected