aboutsummaryrefslogtreecommitdiff
path: root/tempfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'tempfile.c')
-rw-r--r--tempfile.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tempfile.c b/tempfile.c
index 0b5d8ce92..0af7ebf01 100644
--- a/tempfile.c
+++ b/tempfile.c
@@ -137,6 +137,14 @@ int create_tempfile(struct tempfile *tempfile, const char *path)
return tempfile->fd;
}
+void register_tempfile(struct tempfile *tempfile, const char *path)
+{
+ prepare_tempfile_object(tempfile);
+ strbuf_add_absolute_path(&tempfile->filename, path);
+ tempfile->owner = getpid();
+ tempfile->active = 1;
+}
+
int mks_tempfile_sm(struct tempfile *tempfile,
const char *template, int suffixlen, int mode)
{