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

Function mks_tempfile_sm

tempfile.c:172–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172struct tempfile *mks_tempfile_sm(const char *filename_template, int suffixlen, int mode)
173{
174 struct tempfile *tempfile = new_tempfile();
175
176 strbuf_add_absolute_path(&tempfile->filename, filename_template);
177 tempfile->fd = git_mkstemps_mode(tempfile->filename.buf, suffixlen, mode);
178 if (tempfile->fd < 0) {
179 deactivate_tempfile(tempfile);
180 return NULL;
181 }
182 activate_tempfile(tempfile);
183 return tempfile;
184}
185
186struct tempfile *mks_tempfile_tsm(const char *filename_template, int suffixlen, int mode)
187{

Callers 4

mks_tempfile_sFunction · 0.85
mks_tempfile_mFunction · 0.85
mks_tempfileFunction · 0.85
write_locked_indexFunction · 0.85

Calls 5

new_tempfileFunction · 0.85
strbuf_add_absolute_pathFunction · 0.85
git_mkstemps_modeFunction · 0.85
deactivate_tempfileFunction · 0.85
activate_tempfileFunction · 0.85

Tested by

no test coverage detected