Skip to content

Commit c6dfb39

Browse files
j6tgitster
authored andcommitted
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 <[email protected]> Tested-by: Michael Wookey <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6ff9ae9 commit c6dfb39

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

remote-curl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ int main(int argc, const char **argv)
8282
const char *url;
8383
struct walker *walker = NULL;
8484

85+
git_extract_argv0_path(argv[0]);
8586
setup_git_directory();
8687
if (argc < 2) {
8788
fprintf(stderr, "Remote needed\n");

0 commit comments

Comments
 (0)