From: Jeff King Date: Sat, 09 Feb 2013 01:05:24 GMT Subject: Re: segfault for git log --graph --no-walk --grep a Message-ID: <20130209010524.GB5469@sigill.intra.peff.net> In-Reply-To: <7va9rexqii.fsf@alter.siamese.dyndns.org> On Fri, Feb 08, 2013 at 04:47:01PM -0800, Junio C Hamano wrote: > > Yeah, that actually is a good point. We should be using logmsg_reencode > > so that we look for strings in the user's encoding. > > Perhaps like this. Just like the previous one (which should be > discarded), this makes the function always use the temporary strbuf, > so doing this upfront actually loses more code than it adds ;-) I like code simplification, but I worry a little about paying for the extra copy in the common case. I did a best-of-five "git rev-list --count --grep=foo HEAD" before and after your patch, though, and the difference was well within the noise. So maybe it's not worth caring about. -Peff