summaryrefslogtreecommitdiff
path: root/exec_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'exec_cmd.c')
-rw-r--r--exec_cmd.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/exec_cmd.c b/exec_cmd.c
index 9d5703a157..19ac2146d0 100644
--- a/exec_cmd.c
+++ b/exec_cmd.c
@@ -38,21 +38,17 @@ char *system_path(const char *path)
return strbuf_detach(&d, NULL);
}
-const char *git_extract_argv0_path(const char *argv0)
+void git_extract_argv0_path(const char *argv0)
{
const char *slash;
if (!argv0 || !*argv0)
- return NULL;
+ return;
slash = find_last_dir_sep(argv0);
- if (slash) {
+ if (slash)
argv0_path = xstrndup(argv0, slash - argv0);
- return slash + 1;
- }
-
- return argv0;
}
void git_set_argv_exec_path(const char *exec_path)