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

Function reopen_tempfile

tempfile.c:326–334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324}
325
326int reopen_tempfile(struct tempfile *tempfile)
327{
328 if (!is_tempfile_active(tempfile))
329 BUG("reopen_tempfile called for an inactive object");
330 if (0 <= tempfile->fd)
331 BUG("reopen_tempfile called for an open object");
332 tempfile->fd = open(tempfile->filename.buf, O_WRONLY|O_TRUNC);
333 return tempfile->fd;
334}
335
336int rename_tempfile(struct tempfile **tempfile_p, const char *path)
337{

Callers 1

reopen_lock_fileFunction · 0.85

Calls 1

is_tempfile_activeFunction · 0.85

Tested by

no test coverage detected