Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'trace.c')
-rw-r--r--trace.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/trace.c b/trace.c
index 4d68eb522f..4efb256fa2 100644
--- a/trace.c
+++ b/trace.c
@@ -93,9 +93,6 @@ void trace_disable(struct trace_key *key)
key->need_close = 0;
}
-static const char err_msg[] = "could not trace into fd given by "
- "GIT_TRACE environment variable";
-
static int prepare_trace_line(const char *file, int line,
struct trace_key *key, struct strbuf *buf)
{
@@ -133,8 +130,11 @@ static int prepare_trace_line(const char *file, int line,
static void trace_write(struct trace_key *key, const void *buf, unsigned len)
{
- if (write_in_full(get_trace_fd(key), buf, len) < 0)
- warning("%s: write error (%s)", err_msg, strerror(errno));
+ if (write_in_full(get_trace_fd(key), buf, len) < 0) {
+ normalize_trace_key(&key);
+ warning("unable to write trace for %s: %s",
+ key->key, strerror(errno));
+ }
}
void trace_verbatim(struct trace_key *key, const void *buf, unsigned len)