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

Function cmd__mktemp

t/helper/test-mktemp.c:7–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include "git-compat-util.h"
6
7int cmd__mktemp(int argc, const char **argv)
8{
9 char *template;
10 int fd;
11
12 if (argc != 2)
13 usage("Expected 1 parameter defining the temporary file template");
14 template = xstrdup(argv[1]);
15
16 fd = xmkstemp(template);
17
18 close(fd);
19 free(template);
20 return 0;
21}

Callers

nothing calls this directly

Calls 3

xstrdupFunction · 0.85
xmkstempFunction · 0.85
usageFunction · 0.50

Tested by

no test coverage detected