environment: rename 'template' variables

Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Brandon Williams committed Feb 14, 2018 at 10:59 UTC a63b5fca9b322a95d9bfd051b34a76c336693899
2 files changed +8 -8
cache.h
+1 -1
@@ -1673,7 +1673,7 @@ struct pack_entry {
1673 * usual "XXXXXX" trailer, and the resulting filename is written into the
1674 * "template" buffer. Returns the open descriptor.
1675 */
1676 -extern int odb_mkstemp(struct strbuf *template, const char *pattern);
1676 +extern int odb_mkstemp(struct strbuf *temp_filename, const char *pattern);
1677
1678 /*
1679 * Create a pack .keep file named "name" (which should generally be the output
environment.c
+7 -7
@@ -247,7 +247,7 @@ char *get_object_directory(void)
247 return the_repository->objectdir;
248 }
249
250 -int odb_mkstemp(struct strbuf *template, const char *pattern)
250 +int odb_mkstemp(struct strbuf *temp_filename, const char *pattern)
251 {
252 int fd;
253 /*
@@ -255,16 +255,16 @@ int odb_mkstemp(struct strbuf *template, const char *pattern)
255 * restrictive except to remove write permission.
256 */
257 int mode = 0444;
258 - git_path_buf(template, "objects/%s", pattern);
259 - fd = git_mkstemp_mode(template->buf, mode);
258 + git_path_buf(temp_filename, "objects/%s", pattern);
259 + fd = git_mkstemp_mode(temp_filename->buf, mode);
260 if (0 <= fd)
261 return fd;
262
263 /* slow path */
264 - /* some mkstemp implementations erase template on failure */
265 - git_path_buf(template, "objects/%s", pattern);
266 - safe_create_leading_directories(template->buf);
267 - return xmkstemp_mode(template->buf, mode);
264 + /* some mkstemp implementations erase temp_filename on failure */
265 + git_path_buf(temp_filename, "objects/%s", pattern);
266 + safe_create_leading_directories(temp_filename->buf);
267 + return xmkstemp_mode(temp_filename->buf, mode);
268 }
269
270 int odb_pack_keep(const char *name)