Re: [PATCH v2 2/3] diff: add -I<regex> that ignores matching changes
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 13, 2020, 15:53 UTC
- Message-ID
- <xmqqft6iktq0.fsf@gitster.c.googlers.com>
- In-Reply-To
- <nycvar.QRO.7.76.6.2010131401110.50@tvgsbejvaqbjf.bet>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> Oh wow, from a cursory look it seems as if the diff machinery was not > exactly careful with releasing memory. I might be mistaken, but if I am > not, then this would deserve a separate patch series, methinks.
I wouldn't be surprised if newer parts of it is much less careful than the older parts of the machinery. Most callers of the diff machinery, including "log -p" that repeatedly generates patches, would however run just a single setup for the entire series of diff invocations before tearing it down AFIAR, so leaking the result of parsing the command line option may not be such a big deal to these callers. But some callers added recently may not follow the access pattern, in which case the machinery may have to be made more leakproof.
Thanks.