@matheusbsbs / matheus-bagliano / commits / 384df83312
Fork 0

"current_exec_path" is a misleading name, use "argv_exec_path"

Signed-off-by: Scott R Parish <srp@srparish.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Scott R Parish committed Oct 27, 2007 at 01:36 UTC 384df83312d24ea4d11adcf4e73921fc192595d2
3 files changed +8 -8
exec_cmd.c
+6 -6
@@ -5,11 +5,11 @@
5
6 extern char **environ;
7 static const char *builtin_exec_path = GIT_EXEC_PATH;
8 -static const char *current_exec_path;
8 +static const char *argv_exec_path;
9
10 -void git_set_exec_path(const char *exec_path)
10 +void git_set_argv_exec_path(const char *exec_path)
11 {
12 - current_exec_path = exec_path;
12 + argv_exec_path = exec_path;
13 }
14
15
@@ -18,8 +18,8 @@ const char *git_exec_path(void)
18 {
19 const char *env;
20
21 - if (current_exec_path)
22 - return current_exec_path;
21 + if (argv_exec_path)
22 + return argv_exec_path;
23
24 env = getenv(EXEC_PATH_ENVIRONMENT);
25 if (env && *env) {
@@ -34,7 +34,7 @@ int execv_git_cmd(const char **argv)
34 {
35 char git_command[PATH_MAX + 1];
36 int i;
37 - const char *paths[] = { current_exec_path,
37 + const char *paths[] = { argv_exec_path,
38 getenv(EXEC_PATH_ENVIRONMENT),
39 builtin_exec_path };
40
exec_cmd.h
+1 -1
@@ -1,7 +1,7 @@
1 #ifndef GIT_EXEC_CMD_H
2 #define GIT_EXEC_CMD_H
3
4 -extern void git_set_exec_path(const char *exec_path);
4 +extern void git_set_argv_exec_path(const char *exec_path);
5 extern const char* git_exec_path(void);
6 extern int execv_git_cmd(const char **argv); /* NULL terminated */
7 extern int execl_git_cmd(const char *cmd, ...);
git.c
+1 -1
@@ -51,7 +51,7 @@ static int handle_options(const char*** argv, int* argc, int* envchanged)
51 if (!prefixcmp(cmd, "--exec-path")) {
52 cmd += 11;
53 if (*cmd == '=')
54 - git_set_exec_path(cmd + 1);
54 + git_set_argv_exec_path(cmd + 1);
55 else {
56 puts(git_exec_path());
57 exit(0);