From: Junio C Hamano Date: Thu, 04 Apr 2013 22:51:51 GMT Subject: Re: [PATCH v2 1/3] diffcore-pickaxe: remove unnecessary call to get_textconv() Message-ID: <7vppy9gb94.fsf@alter.siamese.dyndns.org> In-Reply-To: <20130404211110.GB25811@sigill.intra.peff.net> Jeff King writes: > But I do not think fill_one is the right interface for it. The reason > has_changes calls get_textconv separately is that we do not want to fill > the buffer (which may be expensive) if we can avoid it. So the correct > sequence is: ... > If you turned fill_one into "fill_both_sides" then you could share > the code between diff_grep/pickaxe and do it in the right order in the > helper. Yeah, I think that is a good way to refactor. A patch later in the series will be killing fill_one() anyway ;-)