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

Function open_output_fd

entry.c:106–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106static int open_output_fd(char *path, const struct cache_entry *ce, int to_tempfile)
107{
108 int symlink = (ce->ce_mode & S_IFMT) != S_IFREG;
109 if (to_tempfile) {
110 xsnprintf(path, TEMPORARY_FILENAME_LENGTH, "%s",
111 symlink ? ".merge_link_XXXXXX" : ".merge_file_XXXXXX");
112 return mkstemp(path);
113 } else {
114 return create_file(path, !symlink ? ce->ce_mode : 0666);
115 }
116}
117
118int fstat_checkout_output(int fd, const struct checkout *state, struct stat *st)
119{

Callers 2

streaming_write_entryFunction · 0.85
write_entryFunction · 0.85

Calls 3

xsnprintfFunction · 0.85
mkstempFunction · 0.85
create_fileFunction · 0.70

Tested by

no test coverage detected