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>
This commit is contained in:

committed by
Junio C Hamano

parent
0bdf93cbf0
commit
ef90d6d420
10
cache.h
10
cache.h
@ -711,10 +711,10 @@ extern int matches_pack_name(struct packed_git *p, const char *name);
|
||||
/* Dumb servers support */
|
||||
extern int update_server_info(int);
|
||||
|
||||
typedef int (*config_fn_t)(const char *, const char *);
|
||||
extern int git_default_config(const char *, const char *);
|
||||
extern int git_config_from_file(config_fn_t fn, const char *);
|
||||
extern int git_config(config_fn_t fn);
|
||||
typedef int (*config_fn_t)(const char *, const char *, void *);
|
||||
extern int git_default_config(const char *, const char *, void *);
|
||||
extern int git_config_from_file(config_fn_t fn, const char *, void *);
|
||||
extern int git_config(config_fn_t fn, void *);
|
||||
extern int git_parse_long(const char *, long *);
|
||||
extern int git_parse_ulong(const char *, unsigned long *);
|
||||
extern int git_config_int(const char *, const char *);
|
||||
@ -726,7 +726,7 @@ extern int git_config_set(const char *, const char *);
|
||||
extern int git_config_set_multivar(const char *, const char *, const char *, int);
|
||||
extern int git_config_rename_section(const char *, const char *);
|
||||
extern const char *git_etc_gitconfig(void);
|
||||
extern int check_repository_format_version(const char *var, const char *value);
|
||||
extern int check_repository_format_version(const char *var, const char *value, void *cb);
|
||||
extern int git_env_bool(const char *, int);
|
||||
extern int git_config_system(void);
|
||||
extern int git_config_global(void);
|
||||
|
Reference in New Issue
Block a user