summaryrefslogtreecommitdiff
path: root/remote-curl.c
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2009-10-13 12:53:28 +0200
committerJunio C Hamano <gitster@pobox.com>2009-10-13 23:24:58 -0700
commitc6dfb399448f6de17ce417052f1bb345c9e022c9 (patch)
tree0a3291cfa525c26aa52976ad984363c60211c00a /remote-curl.c
parent6ff9ae9f97101c30897332f608f35ad232b1faf2 (diff)
downloadgit-c6dfb399448f6de17ce417052f1bb345c9e022c9.tar.gz
remote-curl: add missing initialization of argv0_path
All programs, in particular also the stand-alone programs (non-builtins) must call git_extract_argv0_path(argv[0]) in order to help builds that derive the installation prefix at runtime, such as the MinGW build. Without this call, the program segfaults (or raises an assertion failure). Signed-off-by: Johannes Sixt <j6t@kdbg.org> Tested-by: Michael Wookey <michaelwookey@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'remote-curl.c')
-rw-r--r--remote-curl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/remote-curl.c b/remote-curl.c
index ad6a1637b5..d8d276a471 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -82,6 +82,7 @@ int main(int argc, const char **argv)
const char *url;
struct walker *walker = NULL;
+ git_extract_argv0_path(argv[0]);
setup_git_directory();
if (argc < 2) {
fprintf(stderr, "Remote needed\n");