Re: [PATCH 8/8] trace: give repo_setup trace its own key

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

 



On Fri, Feb 25, 2011 at 4:49 AM, Jonathan Nieder <jrnieder@xxxxxxxxx> wrote:
> Jeff King wrote:
>
>> You no longer get this output with GIT_TRACE=1; instead, you
>> can do GIT_TRACE_SETUP=1.

Minor note. GIT_TRACE warning in test-lib.sh will need improvement for
checking GIT_TRACE_*

>> @@ -170,10 +171,10 @@ void trace_repo_setup(const char *prefix)
>> Â Â Â if (!prefix)
>> Â Â Â Â Â Â Â prefix = "(null)";
>>
>> - Â Â trace_printf("setup: git_dir: %s\n", quote_crnl(get_git_dir()));
>> - Â Â trace_printf("setup: worktree: %s\n", quote_crnl(git_work_tree));
>> - Â Â trace_printf("setup: cwd: %s\n", quote_crnl(cwd));
>> - Â Â trace_printf("setup: prefix: %s\n", quote_crnl(prefix));
>> + Â Â trace_printf_key(key, "setup: git_dir: %s\n", quote_crnl(get_git_dir()));
>> + Â Â trace_printf_key(key, "setup: worktree: %s\n", quote_crnl(git_work_tree));
>> + Â Â trace_printf_key(key, "setup: cwd: %s\n", quote_crnl(cwd));
>> + Â Â trace_printf_key(key, "setup: prefix: %s\n", quote_crnl(prefix));
>
> I wonder if it would make sense for this to be
>
> Â Â Â Âtrace_printf("setup", "git_dir: %s\n", ...);
>
> and:
>
> Â- automatically prefix each line with the key instead of "trace:"
> Â- enable or redirect based on the content of the GIT_TRACE_$(uc $key)
> Â variable

Yeah I think it's nice to have key = "setup", then env name becomes
GIT_TRACE_$(uc $key) and prepend "$key: " in all trace messages.
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]