Re: [PATCH 0/5] consistent setup code for external commands
From: Junio C Hamano <hidden>
Date: 2016-07-01 22:19:46
Jeff King [off-list ref] writes:
On Fri, Jul 01, 2016 at 12:07:15AM -0400, Jeff King wrote:quoted
Interesting. It's failing on the assert(argv0_path) in system_path(). That's part of the RUNTIME_PREFIX code which is built only on Windows, so this is a Windows-specific issue. I can guess the reason that argv0_path is not set is that credential-store has its own main() function and does not call git_extract_argv0_path(). It never mattered before, but as of v2.8.0, one of the library functions it calls wants to use system_path(), which assumes that the argv0 stuff has been set up. I'm preparing some patches to fix this case (and some other related ones).Here they are: [1/5]: add an extra level of indirection to main() [2/5]: common-main: call git_extract_argv0_path() [3/5]: common-main: call sanitize_stdfds() [4/5]: common-main: call restore_sigpipe_to_default() [5/5]: common-main: call git_setup_gettext()
As this is also a fix to maint-2.8 track, I tweaked them to ensure that they apply there, and queued the result as jk/common-main. I double checked the result by comparing the result of applying these five patches directly on top of master, and the result of merging that jk/common-main (based on maint-2.8) into master, and they seem to match. Thanks.