 3d3adaad91
			
		
	
	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>
		
			
				
	
	
		
			40 lines
		
	
	
		
			856 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			856 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #ifndef TR2_SYSENV_H
 | |
| #define TR2_SYSENV_H
 | |
| 
 | |
| /*
 | |
|  * The Trace2 settings that can be loaded from /etc/gitconfig
 | |
|  * and/or user environment variables.
 | |
|  *
 | |
|  * Note that this set does not contain any of the transient
 | |
|  * environment variables used to pass information from parent
 | |
|  * to child git processes, such "GIT_TRACE2_PARENT_SID".
 | |
|  */
 | |
| enum tr2_sysenv_variable {
 | |
| 	TR2_SYSENV_CFG_PARAM = 0,
 | |
| 	TR2_SYSENV_ENV_VARS,
 | |
| 
 | |
| 	TR2_SYSENV_DST_DEBUG,
 | |
| 
 | |
| 	TR2_SYSENV_NORMAL,
 | |
| 	TR2_SYSENV_NORMAL_BRIEF,
 | |
| 
 | |
| 	TR2_SYSENV_EVENT,
 | |
| 	TR2_SYSENV_EVENT_BRIEF,
 | |
| 	TR2_SYSENV_EVENT_NESTING,
 | |
| 
 | |
| 	TR2_SYSENV_PERF,
 | |
| 	TR2_SYSENV_PERF_BRIEF,
 | |
| 
 | |
| 	TR2_SYSENV_MAX_FILES,
 | |
| 
 | |
| 	TR2_SYSENV_MUST_BE_LAST
 | |
| };
 | |
| 
 | |
| void tr2_sysenv_load(void);
 | |
| 
 | |
| const char *tr2_sysenv_get(enum tr2_sysenv_variable);
 | |
| const char *tr2_sysenv_display_name(enum tr2_sysenv_variable var);
 | |
| void tr2_sysenv_release(void);
 | |
| 
 | |
| #endif /* TR2_SYSENV_H */
 |