git-svn: port the 'rebuild' command to use Git::SVN objects
[gitweb.git] / exec_cmd.c
index 5d6a1247b4a1955dffae2b52da064a6eb489d83b..9b74ed2f42ad9a452f5a1d9ab55d5ca1e1de2594 100644 (file)
@@ -21,7 +21,7 @@ const char *git_exec_path(void)
        if (current_exec_path)
                return current_exec_path;
 
-       env = getenv("GIT_EXEC_PATH");
+       env = getenv(EXEC_PATH_ENVIRONMENT);
        if (env && *env) {
                return env;
        }
@@ -35,7 +35,7 @@ int execv_git_cmd(const char **argv)
        char git_command[PATH_MAX + 1];
        int i;
        const char *paths[] = { current_exec_path,
-                               getenv("GIT_EXEC_PATH"),
+                               getenv(EXEC_PATH_ENVIRONMENT),
                                builtin_exec_path };
 
        for (i = 0; i < ARRAY_SIZE(paths); ++i) {
@@ -56,7 +56,7 @@ int execv_git_cmd(const char **argv)
                        len = strlen(git_command);
 
                        /* Trivial cleanup */
-                       while (!strncmp(exec_dir, "./", 2)) {
+                       while (!prefixcmp(exec_dir, "./")) {
                                exec_dir += 2;
                                while (*exec_dir == '/')
                                        exec_dir++;