else if (is_absolute_path(trace)) {
int fd = open(trace, O_WRONLY | O_APPEND | O_CREAT, 0666);
if (fd == -1) {
- warning("Could not open '%s' for tracing: %s\n"
- "Defaulting to tracing on stderr...",
+ warning("could not open '%s' for tracing: %s\n"
+ " Defaulting to tracing on stderr...",
trace, strerror(errno));
key->fd = STDERR_FILENO;
} else {
key->need_close = 1;
}
} else {
- warning("What does '%s' for %s mean?\n"
- "If you want to trace into a file, then please set "
- "%s to an absolute pathname (starting with /).\n"
- "Defaulting to tracing on stderr...",
- trace, key->key, key->key);
+ warning("unknown trace value for '%s': %s\n"
+ " If you want to trace into a file, then please set %s\n"
+ " to an absolute pathname (starting with /)\n"
+ " Defaulting to tracing on stderr...",
+ key->key, trace, key->key);
key->fd = STDERR_FILENO;
}
key->need_close = 0;
}
-static const char err_msg[] = "Could not trace into fd given by "
+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,