git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Scott R Parish <srp@srparish.net>
To: git@vger.kernel.org
Cc: Scott R Parish <srp@srparish.net>
Subject: [PATCH 3/7] "current_exec_path" is a misleading name, use "argv_exec_path" Signed-off-by: Scott R Parish <srp@srparish.net>
Date: Wed, 24 Oct 2007 20:37:13 -0700	[thread overview]
Message-ID: <1193283437-1706-3-git-send-email-srp@srparish.net> (raw)
In-Reply-To: <1193283437-1706-2-git-send-email-srp@srparish.net>

---
 exec_cmd.c |   12 ++++++------
 exec_cmd.h |    2 +-
 git.c      |    2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/exec_cmd.c b/exec_cmd.c
index 9b74ed2..8b681d0 100644
--- a/exec_cmd.c
+++ b/exec_cmd.c
@@ -5,11 +5,11 @@
 
 extern char **environ;
 static const char *builtin_exec_path = GIT_EXEC_PATH;
-static const char *current_exec_path;
+static const char *argv_exec_path = 0;
 
-void git_set_exec_path(const char *exec_path)
+void git_set_argv_exec_path(const char *exec_path)
 {
-	current_exec_path = exec_path;
+	argv_exec_path = exec_path;
 }
 
 
@@ -18,8 +18,8 @@ const char *git_exec_path(void)
 {
 	const char *env;
 
-	if (current_exec_path)
-		return current_exec_path;
+	if (argv_exec_path)
+		return argv_exec_path;
 
 	env = getenv(EXEC_PATH_ENVIRONMENT);
 	if (env && *env) {
@@ -34,7 +34,7 @@ int execv_git_cmd(const char **argv)
 {
 	char git_command[PATH_MAX + 1];
 	int i;
-	const char *paths[] = { current_exec_path,
+	const char *paths[] = { argv_exec_path,
 				getenv(EXEC_PATH_ENVIRONMENT),
 				builtin_exec_path };
 
diff --git a/exec_cmd.h b/exec_cmd.h
index 849a839..da99287 100644
--- a/exec_cmd.h
+++ b/exec_cmd.h
@@ -1,7 +1,7 @@
 #ifndef GIT_EXEC_CMD_H
 #define GIT_EXEC_CMD_H
 
-extern void git_set_exec_path(const char *exec_path);
+extern void git_set_argv_exec_path(const char *exec_path);
 extern const char* git_exec_path(void);
 extern int execv_git_cmd(const char **argv); /* NULL terminated */
 extern int execl_git_cmd(const char *cmd, ...);
diff --git a/git.c b/git.c
index e1c99e3..f659338 100644
--- a/git.c
+++ b/git.c
@@ -51,7 +51,7 @@ static int handle_options(const char*** argv, int* argc, int* envchanged)
 		if (!prefixcmp(cmd, "--exec-path")) {
 			cmd += 11;
 			if (*cmd == '=')
-				git_set_exec_path(cmd + 1);
+				git_set_argv_exec_path(cmd + 1);
 			else {
 				puts(git_exec_path());
 				exit(0);
-- 
gitgui.0.8.4.11176.gd9205-dirty

  reply	other threads:[~2007-10-25  3:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-25  3:37 [PATCH 1/7] "git" calls help_unknown_cmd(""); "git help" and "git help -a" return 0 Scott R Parish
2007-10-25  3:37 ` [PATCH 2/7] s/pattern/prefix/ in help's list_commands Scott R Parish
2007-10-25  3:37   ` Scott R Parish [this message]
2007-10-25  3:37     ` [PATCH 4/7] use only the PATH for exec'ing git commands Scott R Parish
2007-10-25  3:37       ` [PATCH 5/7] chdir() into list_commands() dir instead of building paths for stat() Scott R Parish
2007-10-25  3:37         ` [PATCH 6/7] walk PATH to generate list of commands for "help -a" Scott R Parish
2007-10-25  3:37           ` [PATCH 7/7] shell should call setup_path() instead of manually setting up its path Scott R Parish
2007-10-25  4:42           ` [PATCH 6/7] walk PATH to generate list of commands for "help -a" Junio C Hamano
2007-10-25  5:07             ` Scott Parish
2007-10-25  5:33               ` Junio C Hamano
2007-10-25  7:07                 ` Scott Parish
2007-10-25  4:41   ` [PATCH 2/7] s/pattern/prefix/ in help's list_commands Junio C Hamano
2007-10-25  4:53     ` Scott Parish
2007-10-25  6:30     ` [PATCH 2/7] remove unused/unneeded "pattern" argument of list_commands Scott R Parish
2007-10-25  6:32       ` [PATCH 5/7] chdir() into list_commands() dir instead of building paths for stat() Scott R Parish
2007-10-25  4:40 ` [PATCH 1/7] "git" calls help_unknown_cmd(""); "git help" and "git help -a" return 0 Junio C Hamano
2007-10-25  4:52   ` Scott Parish
2007-10-26 23:03     ` Junio C Hamano
2007-10-27  7:16       ` Scott Parish

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1193283437-1706-3-git-send-email-srp@srparish.net \
    --to=srp@srparish.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).