Skip to content

Commit

Permalink
remote-curl: add missing initialization of argv0_path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
j6t authored and gitster committed Oct 14, 2009
1 parent 6ff9ae9 commit c6dfb39
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions remote-curl.c
Expand Up @@ -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");
Expand Down

0 comments on commit c6dfb39

Please sign in to comment.