summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d685990)
raw | patch | inline | side by side (parent: d685990)
author | Dmitry V. Levin <ldv@altlinux.org> | |
Mon, 29 May 2006 00:34:34 +0000 (04:34 +0400) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 31 May 2006 04:49:01 +0000 (21:49 -0700) |
Ignoring empty environment variables is good common practice.
Ignoring --exec-path with empty argument won't harm, too:
if user means current directory, there is a "--exec-path=."
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Ignoring --exec-path with empty argument won't harm, too:
if user means current directory, there is a "--exec-path=."
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
exec_cmd.c | patch | blob | history |
diff --git a/exec_cmd.c b/exec_cmd.c
index 12eb36494ca467169aff4db35335b3fdadd4cbee..c1539d12ce9e350811b5b110206f5577a151e8ef 100644 (file)
--- a/exec_cmd.c
+++ b/exec_cmd.c
return current_exec_path;
env = getenv("GIT_EXEC_PATH");
- if (env) {
+ if (env && *env) {
return env;
}
const char *exec_dir = paths[i];
const char *tmp;
- if (!exec_dir) continue;
+ if (!exec_dir || !*exec_dir) continue;
if (*exec_dir != '/') {
if (!getcwd(git_command, sizeof(git_command))) {