Skip to content

Commit 384df83

Browse files
srpgitster
authored andcommitted
"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>
1 parent edb6ddc commit 384df83

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

exec_cmd.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55

66
extern char **environ;
77
static const char *builtin_exec_path = GIT_EXEC_PATH;
8-
static const char *current_exec_path;
8+
static const char *argv_exec_path;
99

10-
void git_set_exec_path(const char *exec_path)
10+
void git_set_argv_exec_path(const char *exec_path)
1111
{
12-
current_exec_path = exec_path;
12+
argv_exec_path = exec_path;
1313
}
1414

1515

@@ -18,8 +18,8 @@ const char *git_exec_path(void)
1818
{
1919
const char *env;
2020

21-
if (current_exec_path)
22-
return current_exec_path;
21+
if (argv_exec_path)
22+
return argv_exec_path;
2323

2424
env = getenv(EXEC_PATH_ENVIRONMENT);
2525
if (env && *env) {
@@ -34,7 +34,7 @@ int execv_git_cmd(const char **argv)
3434
{
3535
char git_command[PATH_MAX + 1];
3636
int i;
37-
const char *paths[] = { current_exec_path,
37+
const char *paths[] = { argv_exec_path,
3838
getenv(EXEC_PATH_ENVIRONMENT),
3939
builtin_exec_path };
4040

exec_cmd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef GIT_EXEC_CMD_H
22
#define GIT_EXEC_CMD_H
33

4-
extern void git_set_exec_path(const char *exec_path);
4+
extern void git_set_argv_exec_path(const char *exec_path);
55
extern const char* git_exec_path(void);
66
extern int execv_git_cmd(const char **argv); /* NULL terminated */
77
extern int execl_git_cmd(const char *cmd, ...);

git.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ static int handle_options(const char*** argv, int* argc, int* envchanged)
5151
if (!prefixcmp(cmd, "--exec-path")) {
5252
cmd += 11;
5353
if (*cmd == '=')
54-
git_set_exec_path(cmd + 1);
54+
git_set_argv_exec_path(cmd + 1);
5555
else {
5656
puts(git_exec_path());
5757
exit(0);

0 commit comments

Comments
 (0)