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>
Johannes Sixt committed
Oct 13, 2009 at 12:53 UTC
c6dfb399448f6de17ce417052f1bb345c9e022c9
1 file changed
+1
remote-curl.c
+1
@@ -82,6 +82,7 @@ int main(int argc, const char **argv)
82
const char *url;
83
struct walker *walker = NULL;
84
85
+ git_extract_argv0_path(argv[0]);
86
setup_git_directory();
87
if (argc < 2) {
88
fprintf(stderr, "Remote needed\n");