diff options
author | Simon Ruderich <simon@ruderich.org> | 2013-04-04 22:20:29 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-04-04 20:33:19 -0700 |
commit | bc6158981b547db3d3eb754213467fed97109d57 (patch) | |
tree | 30c0adfa6ebb3ca29304ae11cb15e6b7196effb0 /t/t5100/msg0014--scissors | |
parent | pickaxe: use textconv for -S counting (diff) | |
download | tgif-bc6158981b547db3d3eb754213467fed97109d57.tar.xz |
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>
Diffstat (limited to 't/t5100/msg0014--scissors')
0 files changed, 0 insertions, 0 deletions