mirror of
https://github.com/git/git.git
synced 2024-11-19 01:44:02 +01:00
trailer: 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>
This commit is contained in:
parent
ea8ace4ad3
commit
31c2c7a0ce
10
trailer.c
10
trailer.c
@ -1000,7 +1000,7 @@ static struct tempfile *trailers_tempfile;
|
|||||||
static FILE *create_in_place_tempfile(const char *file)
|
static FILE *create_in_place_tempfile(const char *file)
|
||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
struct strbuf template = STRBUF_INIT;
|
struct strbuf filename_template = STRBUF_INIT;
|
||||||
const char *tail;
|
const char *tail;
|
||||||
FILE *outfile;
|
FILE *outfile;
|
||||||
|
|
||||||
@ -1014,11 +1014,11 @@ static FILE *create_in_place_tempfile(const char *file)
|
|||||||
/* Create temporary file in the same directory as the original */
|
/* Create temporary file in the same directory as the original */
|
||||||
tail = strrchr(file, '/');
|
tail = strrchr(file, '/');
|
||||||
if (tail != NULL)
|
if (tail != NULL)
|
||||||
strbuf_add(&template, file, tail - file + 1);
|
strbuf_add(&filename_template, file, tail - file + 1);
|
||||||
strbuf_addstr(&template, "git-interpret-trailers-XXXXXX");
|
strbuf_addstr(&filename_template, "git-interpret-trailers-XXXXXX");
|
||||||
|
|
||||||
trailers_tempfile = xmks_tempfile_m(template.buf, st.st_mode);
|
trailers_tempfile = xmks_tempfile_m(filename_template.buf, st.st_mode);
|
||||||
strbuf_release(&template);
|
strbuf_release(&filename_template);
|
||||||
outfile = fdopen_tempfile(trailers_tempfile, "w");
|
outfile = fdopen_tempfile(trailers_tempfile, "w");
|
||||||
if (!outfile)
|
if (!outfile)
|
||||||
die_errno(_("could not open temporary file"));
|
die_errno(_("could not open temporary file"));
|
||||||
|
Loading…
Reference in New Issue
Block a user