Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git wrapper: fix command name in an error message.
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>
git.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
80f5074
)
diff --git
a/git.c
b/git.c
index 94e9a4a4b98acbd9e08943dbbe57616bd60b28e9..94505c9a902125c753c12c0ec8e6fc8268a4271c 100644
(file)
--- a/
git.c
+++ b/
git.c
@@
-206,7
+206,6
@@
int main(int argc, const char **argv, char **envp)
{
const char *cmd = argv[0];
char *slash = strrchr(cmd, '/');
- char git_command[PATH_MAX + 1];
const char *exec_path = NULL;
int done_alias = 0;
@@
-313,7
+312,7
@@
int main(int argc, const char **argv, char **envp)
cmd_usage(0, exec_path, "'%s' is not a git-command", cmd);
fprintf(stderr, "Failed to run command '%s': %s\n",
-
git_comman
d, strerror(errno));
+
cm
d, strerror(errno));
return 1;
}