mirror of
https://github.com/git/git.git
synced 2024-12-12 03:14:11 +08:00
3d3adaad91
Via trace2, Git can already log interesting config parameters (see the trace2_cmd_list_config() function). However, this can grant an incomplete picture because many config parameters also allow overrides via environment variables. To allow for more complete logs, we add a new trace2_cmd_list_env_vars() function and supporting implementation, modeled after the pre-existing config param logging implementation. Signed-off-by: Josh Steadmon <steadmon@google.com> Acked-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
28 lines
673 B
C
28 lines
673 B
C
#ifndef TR2_CFG_H
|
|
#define TR2_CFG_H
|
|
|
|
/*
|
|
* Iterate over all config settings and emit 'def_param' events for the
|
|
* "interesting" ones to TRACE2.
|
|
*/
|
|
void tr2_cfg_list_config_fl(const char *file, int line);
|
|
|
|
/*
|
|
* Iterate over all "interesting" environment variables and emit 'def_param'
|
|
* events for them to TRACE2.
|
|
*/
|
|
void tr2_list_env_vars_fl(const char *file, int line);
|
|
|
|
/*
|
|
* Emit a "def_param" event for the given key/value pair IF we consider
|
|
* the key to be "interesting".
|
|
*/
|
|
void tr2_cfg_set_fl(const char *file, int line, const char *key,
|
|
const char *value);
|
|
|
|
void tr2_cfg_free_patterns(void);
|
|
|
|
void tr2_cfg_free_env_vars(void);
|
|
|
|
#endif /* TR2_CFG_H */
|