Subject: [PATCH] log which temporary file could not be created

From: Arnout Engelen <[email-masked]>
Date: Sat, 9 Oct 2010 22:17:51 +0200

When creating a temporary file, log the template. Useful for making debugging 
problems like file permission mistakes easier.

Signed-off-by: Arnout Engelen <[email-masked]>

---
 wrapper.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/wrapper.c b/wrapper.c
index fd8ead3..68053cd 100644
--- a/wrapper.c
+++ b/wrapper.c
@@ -215,7 +215,7 @@ int xmkstemp(char *template)
 
 	fd = mkstemp(template);
 	if (fd < 0)
-		die_errno("Unable to create temporary file");
+		die_errno("Unable to create temporary file '%s'", template);
 	return fd;
 }
 
@@ -225,7 +225,7 @@ int xmkstemp_mode(char *template, int mode)
 
 	fd = git_mkstemp_mode(template, mode);
 	if (fd < 0)
-		die_errno("Unable to create temporary file");
+		die_errno("Unable to create temporary file '%s'", template);
 	return fd;
 }
 
-- 
1.7.2.3