Commit 984c6e7e authored by Brian Hetro's avatar Brian Hetro Committed by Junio C Hamano

builtin-commit.c: Use 'git_config_string' to get 'commit.template'

Signed-off-by: default avatarBrian Hetro <[email protected]>
Signed-off-by: default avatarJunio C Hamano <[email protected]>
parent 7ef8ea70
......@@ -45,7 +45,8 @@ static enum {
COMMIT_PARTIAL,
} commit_style;
static char *logfile, *force_author, *template_file;
static char *logfile, *force_author;
static const char *template_file;
static char *edit_message, *use_message;
static char *author_name, *author_email, *author_date;
static int all, edit_flag, also, interactive, only, amend, signoff;
......@@ -864,12 +865,8 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
int git_commit_config(const char *k, const char *v, void *cb)
{
if (!strcmp(k, "commit.template")) {
if (!v)
return config_error_nonbool(v);
template_file = xstrdup(v);
return 0;
}
if (!strcmp(k, "commit.template"))
return git_config_string(&template_file, k, v);
return git_status_config(k, v, cb);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment