summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 80f5074)
raw | patch | inline | side by side (parent: 80f5074)
author | Andreas Ericsson <ae@op5.se> | |
Wed, 28 Jun 2006 09:17:21 +0000 (02:17 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 28 Jun 2006 10:20:51 +0000 (03:20 -0700) |
When the command execution by execv_git_cmd() fails with an errno
other than ENOENT, we used an uninitialized variable instead of
the string that holds the command name to report what failed.
Signed-off-by: Junio C Hamano <junkio@cox.net>
other than ENOENT, we used an uninitialized variable instead of
the string that holds the command name to report what failed.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git.c | patch | blob | history |
index 94e9a4a4b98acbd9e08943dbbe57616bd60b28e9..94505c9a902125c753c12c0ec8e6fc8268a4271c 100644 (file)
--- a/git.c
+++ b/git.c
{
const char *cmd = argv[0];
char *slash = strrchr(cmd, '/');
- char git_command[PATH_MAX + 1];
const char *exec_path = NULL;
int done_alias = 0;
cmd_usage(0, exec_path, "'%s' is not a git-command", cmd);
fprintf(stderr, "Failed to run command '%s': %s\n",
- git_command, strerror(errno));
+ cmd, strerror(errno));
return 1;
}