summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bbc30f9)
raw | patch | inline | side by side (parent: bbc30f9)
author | Jeff King <peff@peff.net> | |
Thu, 24 Feb 2011 14:30:30 +0000 (09:30 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 8 Mar 2011 20:12:04 +0000 (12:12 -0800) |
You no longer get this output with GIT_TRACE=1; instead, you
can do GIT_TRACE_SETUP=1.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
can do GIT_TRACE_SETUP=1.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1510-repo-setup.sh | patch | blob | history | |
trace.c | patch | blob | history |
diff --git a/t/t1510-repo-setup.sh b/t/t1510-repo-setup.sh
index 15101d5e032fbbef4a66039342d07afbc5203ee0..ec50a9ad70450cb80074a6002c66bf2efb8e7833 100755 (executable)
--- a/t/t1510-repo-setup.sh
+++ b/t/t1510-repo-setup.sh
export GIT_WORK_TREE
fi &&
rm -f trace &&
- GIT_TRACE="$(pwd)/trace" git symbolic-ref HEAD >/dev/null &&
+ GIT_TRACE_SETUP="$(pwd)/trace" git symbolic-ref HEAD >/dev/null &&
grep '^setup: ' trace >result &&
test_cmp expected result
)
index 9f39eab025248511449a2dc6921578510e8429b4..8390bf7cbb82e8f1e9e6f7229516e43f288d6e41 100644 (file)
--- a/trace.c
+++ b/trace.c
/* FIXME: move prefix to startup_info struct and get rid of this arg */
void trace_repo_setup(const char *prefix)
{
+ static const char *key = "GIT_TRACE_SETUP";
const char *git_work_tree;
char cwd[PATH_MAX];
- if (!trace_want("GIT_TRACE"))
+ if (!trace_want(key))
return;
if (!getcwd(cwd, PATH_MAX))
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));
}
int trace_want(const char *key)