summaryrefslogtreecommitdiff
path: root/environment.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2018-02-14 18:59:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-02-22 18:08:05 (GMT)
commita63b5fca9b322a95d9bfd051b34a76c336693899 (patch)
treebb2b6aed5c13804e5bb852022ec12e63a2c010bb /environment.c
parentfa0fccae6ab1ad242d8805baf5acb7e5d4518540 (diff)
downloadgit-a63b5fca9b322a95d9bfd051b34a76c336693899.zip
git-a63b5fca9b322a95d9bfd051b34a76c336693899.tar.gz
git-a63b5fca9b322a95d9bfd051b34a76c336693899.tar.bz2
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>
Diffstat (limited to 'environment.c')
-rw-r--r--environment.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/environment.c b/environment.c
index 63ac38a..98f77ea 100644
--- a/environment.c
+++ b/environment.c
@@ -247,7 +247,7 @@ char *get_object_directory(void)
return the_repository->objectdir;
}
-int odb_mkstemp(struct strbuf *template, const char *pattern)
+int odb_mkstemp(struct strbuf *temp_filename, const char *pattern)
{
int fd;
/*
@@ -255,16 +255,16 @@ int odb_mkstemp(struct strbuf *template, const char *pattern)
* restrictive except to remove write permission.
*/
int mode = 0444;
- git_path_buf(template, "objects/%s", pattern);
- fd = git_mkstemp_mode(template->buf, mode);
+ git_path_buf(temp_filename, "objects/%s", pattern);
+ fd = git_mkstemp_mode(temp_filename->buf, mode);
if (0 <= fd)
return fd;
/* slow path */
- /* some mkstemp implementations erase template on failure */
- git_path_buf(template, "objects/%s", pattern);
- safe_create_leading_directories(template->buf);
- return xmkstemp_mode(template->buf, mode);
+ /* some mkstemp implementations erase temp_filename on failure */
+ git_path_buf(temp_filename, "objects/%s", pattern);
+ safe_create_leading_directories(temp_filename->buf);
+ return xmkstemp_mode(temp_filename->buf, mode);
}
int odb_pack_keep(const char *name)