Re: Crash on MSYS2 with GIT_WORK_TREE
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 8, 2017, 17:24 UTC
- Message-ID
- <xmqqpohr3cm9.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <alpine.DEB.2.20.1703081304130.3767@virtualbox>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 6 quoted lines
> Rather than a heavy-handed reversal, I would really prefer to perform a > diligent audit of all real_pathdup() callers and adjust them > appropriately. > > Turns out that the canonicalize_ceiling_entry() caller is *the only one* > handling NULL correctly. All other callers need to be changed.
The observation matches what I saw.
I would have added a patch that introduces real_pathdup_gently() that returns NULL and made real_pathdup() die as before immediately on top of the Brandon's series (which would ensure that any branch that would want to use real_pathdup() would get the dying version by default) and flipped selected callers to call the gently() version in that patch, but what you posted is a lot more apprporiate for a regression fix. By changing the function signature, the patch ensures that it covers all the callsites.
Among the two-and-half regressions known to us post 2.12 so far, this one probably needs to go into a maintenance release without waiting for the other one-and-half, I think.
Thanks.