Re: [PATCH v3 5/5] bitmap: add trace2 outputs during open "bitmap" file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 6/12/22 3:44 AM, Teng Long wrote:
[...]
struct bitmap_index *prepare_bitmap_git(struct repository *r)
diff --git a/repo-settings.c b/repo-settings.c
index b4fbd16cdc..5bc7a97a6d 100644
--- a/repo-settings.c
+++ b/repo-settings.c
@@ -8,6 +8,7 @@ static void repo_cfg_bool(struct repository *r, const char *key, int *dest,
  {
  	if (repo_config_get_bool(r, key, dest))
  		*dest = def;
+	trace2_data_string("config", r, key, *dest ? "true" : "false");
  }

We should not be doing.  This would dump every repo-related
boolean value on every command.

I already have a GIT_TRACE2_CONFIG_PARAMS and trace2.configparams
that will dump "interesting" config values to the trace2 log.
Just set one of them to a list of regex's.  Look at the comment above
trace2_cmd_list_config() in trace2.h for details.

We also have GIT_TRACE2_ENV_VARS and trace2.envvars that will dump
the values of "interesting" env vars.

You can use these in your testing to log the config and env var
values that you are interested in.

Jeff




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux