提交 c6dfb399 编写于 作者: J Johannes Sixt 提交者: Junio C Hamano

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: NJohannes Sixt <j6t@kdbg.org>
Tested-by: NMichael Wookey <michaelwookey@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 6ff9ae9f
......@@ -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");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册