diff: 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 c2a46a7c1f4697e805efc42e08b796d057db2aad
1 file changed +5 -5
diff.c
+5 -5
@@ -3660,15 +3660,15 @@ static void prep_temp_blob(const char *path, struct diff_tempfile *temp,
3660 int mode)
3661 {
3662 struct strbuf buf = STRBUF_INIT;
3663 - struct strbuf template = STRBUF_INIT;
3663 + struct strbuf tempfile = STRBUF_INIT;
3664 char *path_dup = xstrdup(path);
3665 const char *base = basename(path_dup);
3666
3667 /* Generate "XXXXXX_basename.ext" */
3668 - strbuf_addstr(&template, "XXXXXX_");
3669 - strbuf_addstr(&template, base);
3668 + strbuf_addstr(&tempfile, "XXXXXX_");
3669 + strbuf_addstr(&tempfile, base);
3670
3671 - temp->tempfile = mks_tempfile_ts(template.buf, strlen(base) + 1);
3671 + temp->tempfile = mks_tempfile_ts(tempfile.buf, strlen(base) + 1);
3672 if (!temp->tempfile)
3673 die_errno("unable to create temp-file");
3674 if (convert_to_working_tree(path,
@@ -3683,7 +3683,7 @@ static void prep_temp_blob(const char *path, struct diff_tempfile *temp,
3683 oid_to_hex_r(temp->hex, oid);
3684 xsnprintf(temp->mode, sizeof(temp->mode), "%06o", mode);
3685 strbuf_release(&buf);
3686 - strbuf_release(&template);
3686 + strbuf_release(&tempfile);
3687 free(path_dup);
3688 }
3689