Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
builtin-commit.c: Use 'git_config_string' to get 'commit.template'
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>
builtin-commit.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
7ef8ea7
)
diff --git
a/builtin-commit.c
b/builtin-commit.c
index 90200ed643bcf21f28a66396f0d15db920a5d4c8..bcbea3893b6ddb40388f5a5ab49b022af5a88df1 100644
(file)
--- a/
builtin-commit.c
+++ b/
builtin-commit.c
@@
-45,7
+45,8
@@
static enum {
COMMIT_PARTIAL,
} commit_style;
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;
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)
{
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);
}
return git_status_config(k, v, cb);
}