diffcore-pickaxe: remove unnecessary call to get_textconv()
commitbc6158981b547db3d3eb754213467fed97109d57
authorSimon Ruderich <simon@ruderich.org>
Thu, 4 Apr 2013 20:20:29 +0000 (4 22:20 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 5 Apr 2013 03:33:19 +0000 (4 20:33 -0700)
tree30c0adfa6ebb3ca29304ae11cb15e6b7196effb0
parentef90ab66e8eaa863777a8d383c5af2ff43a426d2
diffcore-pickaxe: remove unnecessary call to get_textconv()

The fill_one() function is responsible for finding and filling the
textconv filter as necessary, and is called by diff_grep() function
that implements "git log -G<pattern>".

The has_changes() function that implements "git log -S<block>" calls
get_textconv() for two sides being compared, before it checks to see
if it was asked to perform the pickaxe limiting.  Move the code
around to avoid this wastage.

After has_changes() calls get_textconv() to obtain textconv for both
sides, fill_one() is called to use them.

By adding get_textconv() to diff_grep() and relieving fill_one() of
responsibility to find the textconv filter, we can avoid calling
get_textconv() twice in has_changes().

With this change it's also no longer necessary for fill_one() to
modify the textconv argument, therefore pass a pointer instead of a
pointer to a pointer.

Signed-off-by: Simon Ruderich <simon@ruderich.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diffcore-pickaxe.c