diff options
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | 2008-05-14 18:46:53 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-05-14 12:34:44 -0700 |
commit | ef90d6d4208a5130185b04f06e5f90a5f9959fe3 (patch) | |
tree | 1bcef191493614c192a6c690c6264ec8157ff8de /builtin-commit.c | |
parent | 0bdf93cbf0afd568384f237378ba368e751a2f0f (diff) | |
download | git-ef90d6d4208a5130185b04f06e5f90a5f9959fe3.tar.gz git-ef90d6d4208a5130185b04f06e5f90a5f9959fe3.tar.xz |
Provide git_config with a callback-data parameter
git_config() only had a function parameter, but no callback data
parameter. This assumes that all callback functions only modify
global variables.
With this patch, every callback gets a void * parameter, and it is hoped
that this will help the libification effort.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-commit.c')
-rw-r--r-- | builtin-commit.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin-commit.c b/builtin-commit.c index a65c2b8c3..9f0026ed0 100644 --- a/builtin-commit.c +++ b/builtin-commit.c @@ -773,7 +773,7 @@ int cmd_status(int argc, const char **argv, const char *prefix) const char *index_file; int commitable; - git_config(git_status_config); + git_config(git_status_config, NULL); if (wt_status_use_color == -1) wt_status_use_color = git_use_color_default; @@ -827,7 +827,7 @@ static void print_summary(const char *prefix, const unsigned char *sha1) } } -int git_commit_config(const char *k, const char *v) +int git_commit_config(const char *k, const char *v, void *cb) { if (!strcmp(k, "commit.template")) { if (!v) @@ -836,7 +836,7 @@ int git_commit_config(const char *k, const char *v) return 0; } - return git_status_config(k, v); + return git_status_config(k, v, cb); } static const char commit_utf8_warn[] = @@ -864,7 +864,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix) unsigned char commit_sha1[20]; struct ref_lock *ref_lock; - git_config(git_commit_config); + git_config(git_commit_config, NULL); argc = parse_and_validate_options(argc, argv, builtin_commit_usage); |