summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7ef8ea7)
raw | patch | inline | side by side (parent: 7ef8ea7)
author | Brian Hetro <whee@smaertness.net> | |
Sat, 5 Jul 2008 05:24:40 +0000 (01:24 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 6 Jul 2008 00:42:54 +0000 (17:42 -0700) |
Signed-off-by: Brian Hetro <whee@smaertness.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-commit.c | patch | blob | history |
diff --git a/builtin-commit.c b/builtin-commit.c
index 90200ed643bcf21f28a66396f0d15db920a5d4c8..bcbea3893b6ddb40388f5a5ab49b022af5a88df1 100644 (file)
--- a/builtin-commit.c
+++ b/builtin-commit.c
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;
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);
}