Skip to content

Commit c2a46a7

Browse files
bmwillgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a63b5fc commit c2a46a7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

diff.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3660,15 +3660,15 @@ static void prep_temp_blob(const char *path, struct diff_tempfile *temp,
36603660
int mode)
36613661
{
36623662
struct strbuf buf = STRBUF_INIT;
3663-
struct strbuf template = STRBUF_INIT;
3663+
struct strbuf tempfile = STRBUF_INIT;
36643664
char *path_dup = xstrdup(path);
36653665
const char *base = basename(path_dup);
36663666

36673667
/* Generate "XXXXXX_basename.ext" */
3668-
strbuf_addstr(&template, "XXXXXX_");
3669-
strbuf_addstr(&template, base);
3668+
strbuf_addstr(&tempfile, "XXXXXX_");
3669+
strbuf_addstr(&tempfile, base);
36703670

3671-
temp->tempfile = mks_tempfile_ts(template.buf, strlen(base) + 1);
3671+
temp->tempfile = mks_tempfile_ts(tempfile.buf, strlen(base) + 1);
36723672
if (!temp->tempfile)
36733673
die_errno("unable to create temp-file");
36743674
if (convert_to_working_tree(path,
@@ -3683,7 +3683,7 @@ static void prep_temp_blob(const char *path, struct diff_tempfile *temp,
36833683
oid_to_hex_r(temp->hex, oid);
36843684
xsnprintf(temp->mode, sizeof(temp->mode), "%06o", mode);
36853685
strbuf_release(&buf);
3686-
strbuf_release(&template);
3686+
strbuf_release(&tempfile);
36873687
free(path_dup);
36883688
}
36893689

0 commit comments

Comments
 (0)