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

Function get_tmp_template

t/unit-tests/u-reftable-stack.c:61–68  ·  view source on GitHub ↗

* Work linenumber into the tempdir, so we can see which tests forget to * cleanup. */

Source from the content-addressed store, hash-verified

59 * cleanup.
60 */
61static char *get_tmp_template(int linenumber)
62{
63 const char *tmp = getenv("TMPDIR");
64 static char template[1024];
65 snprintf(template, sizeof(template) - 1, "%s/stack_test-%d.XXXXXX",
66 tmp ? tmp : "/tmp", linenumber);
67 return template;
68}
69
70static char *get_tmp_dir(int linenumber)
71{

Callers 2

get_tmp_dirFunction · 0.85

Calls

no outgoing calls

Tested by 1