Re: [PATCH 0/5] consistent setup code for external commands
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 1, 2016, 22:19 UTC
- Message-ID
- <xmqq4m89vw5i.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20160701055532.GA4488@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 23 quoted lines
> On Fri, Jul 01, 2016 at 12:07:15AM -0400, Jeff King wrote: > >> 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.