tempfile: add several functions for creating temporary files
commit354ab1120665f691c17b21fdb04c4362c8088dfa
authorMichael Haggerty <mhagger@alum.mit.edu>
Mon, 10 Aug 2015 09:47:43 +0000 (10 11:47 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 10 Aug 2015 19:57:14 +0000 (10 12:57 -0700)
tree834868915e64ab1df72cee35700aed5dcf079fef
parent7eba6ce5c79447579689218d8dab59a8434fd7c7
tempfile: add several functions for creating temporary files

Add several functions for creating temporary files with
automatically-generated names, analogous to mkstemps(), but also
arranging for the files to be deleted on program exit.

The functions are named according to a pattern depending how they
operate. They will be used to replace many places in the code where
temporary files are created and cleaned up ad-hoc.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
tempfile.c
tempfile.h