{"thread":{"id":"10430","subject":"[PATCH] \"current_exec_path\" is a misleading name, use \"argv_exec_path\"","startedAt":"2007-10-22T17:01:08Z","lastAt":"2007-10-22T17:01:08Z","messageCount":1,"participants":["Scott R Parish"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"56895","messageId":"20071022170108.GA29642@srparish.net","threadId":"10430","inReplyTo":null,"subject":"[PATCH] \"current_exec_path\" is a misleading name, use \"argv_exec_path\"","fromName":"Scott R Parish","fromEmail":"srp@srparish.net","sentAt":"2007-10-22T17:01:08Z","receivedAt":"2007-10-22T17:01:08Z","isPatch":true,"sender":{"key":"srp@srparish.net","avatar":"https://gravatar.com/avatar/870e5b6fc4f710cf4db5684bd9af7f2cee5734b3dab3209b13e00cf64f6c9f0e?d=mp&s=160"},"body":" Signed-off-by: Scott R Parish <srp@srparish.net>\n\n---\n exec_cmd.c |   12 ++++++------\n exec_cmd.h |    2 +-\n git.c      |    2 +-\n 3 files changed, 8 insertions(+), 8 deletions(-)\n\ndiff --git a/exec_cmd.c b/exec_cmd.c\nindex 9b74ed2..8b681d0 100644\n--- a/exec_cmd.c\n+++ b/exec_cmd.c\n@@ -5,11 +5,11 @@\n \n extern char **environ;\n static const char *builtin_exec_path = GIT_EXEC_PATH;\n-static const char *current_exec_path;\n+static const char *argv_exec_path = 0;\n \n-void git_set_exec_path(const char *exec_path)\n+void git_set_argv_exec_path(const char *exec_path)\n {\n-\tcurrent_exec_path = exec_path;\n+\targv_exec_path = exec_path;\n }\n \n \n@@ -18,8 +18,8 @@ const char *git_exec_path(void)\n {\n \tconst char *env;\n \n-\tif (current_exec_path)\n-\t\treturn current_exec_path;\n+\tif (argv_exec_path)\n+\t\treturn argv_exec_path;\n \n \tenv = getenv(EXEC_PATH_ENVIRONMENT);\n \tif (env && *env) {\n@@ -34,7 +34,7 @@ int execv_git_cmd(const char **argv)\n {\n \tchar git_command[PATH_MAX + 1];\n \tint i;\n-\tconst char *paths[] = { current_exec_path,\n+\tconst char *paths[] = { argv_exec_path,\n \t\t\t\tgetenv(EXEC_PATH_ENVIRONMENT),\n \t\t\t\tbuiltin_exec_path };\n \ndiff --git a/exec_cmd.h b/exec_cmd.h\nindex 849a839..da99287 100644\n--- a/exec_cmd.h\n+++ b/exec_cmd.h\n@@ -1,7 +1,7 @@\n #ifndef GIT_EXEC_CMD_H\n #define GIT_EXEC_CMD_H\n \n-extern void git_set_exec_path(const char *exec_path);\n+extern void git_set_argv_exec_path(const char *exec_path);\n extern const char* git_exec_path(void);\n extern int execv_git_cmd(const char **argv); /* NULL terminated */\n extern int execl_git_cmd(const char *cmd, ...);\ndiff --git a/git.c b/git.c\nindex e1c99e3..f659338 100644\n--- a/git.c\n+++ b/git.c\n@@ -51,7 +51,7 @@ static int handle_options(const char*** argv, int* argc, int* envchanged)\n \t\tif (!prefixcmp(cmd, \"--exec-path\")) {\n \t\t\tcmd += 11;\n \t\t\tif (*cmd == '=')\n-\t\t\t\tgit_set_exec_path(cmd + 1);\n+\t\t\t\tgit_set_argv_exec_path(cmd + 1);\n \t\t\telse {\n \t\t\t\tputs(git_exec_path());\n \t\t\t\texit(0);\n-- \ngitgui.0.8.4.11176.gd9205-dirty\n"}]}