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

Function delete_tempfile

tempfile.c:360–375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

358}
359
360int delete_tempfile(struct tempfile **tempfile_p)
361{
362 struct tempfile *tempfile = *tempfile_p;
363 int err = 0;
364
365 if (!is_tempfile_active(tempfile))
366 return 0;
367
368 err |= close_tempfile_gently(tempfile);
369 err |= unlink_or_warn(tempfile->filename.buf);
370 err |= remove_template_directory(tempfile, 0);
371 deactivate_tempfile(tempfile);
372 *tempfile_p = NULL;
373
374 return err ? -1 : 0;
375}
376
377void reassign_tempfile_ownership(pid_t from, pid_t to)
378{

Callers 15

create_tempfile_modeFunction · 0.85
rename_tempfileFunction · 0.85
commit_lock_fileFunction · 0.85
rollback_lock_fileFunction · 0.85
update_info_fileFunction · 0.85
remove_tempfileFunction · 0.85
write_locked_indexFunction · 0.85
verify_gpg_signed_bufferFunction · 0.85
verify_ssh_signed_bufferFunction · 0.85
sign_buffer_sshFunction · 0.85
midx_snapshot_refsFunction · 0.85

Calls 5

is_tempfile_activeFunction · 0.85
close_tempfile_gentlyFunction · 0.85
unlink_or_warnFunction · 0.85
deactivate_tempfileFunction · 0.85

Tested by 1