pickaxe: merge diffcore_pickaxe_grep() and diffcore_pickaxe_count() into diffcore_pic...
commit63b52afaa88bf89c781fe11c6803ff1dcc47d424
authorRené Scharfe <l.s.r@web.de>
Sat, 22 Mar 2014 17:15:57 +0000 (22 18:15 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 24 Mar 2014 22:12:45 +0000 (24 15:12 -0700)
treebc123aab98ff4026a056898a1e3e39bf068d332d
parent218c45a45c4e1c3b09a1b6b2bc6e6ed457e38a9f
pickaxe: merge diffcore_pickaxe_grep() and diffcore_pickaxe_count() into diffcore_pickaxe()

diffcore_pickaxe_count() initializes the regular expression or kwset for
the search term, calls pickaxe() with the callback has_changes() and
cleans up afterwards.  diffcore_pickaxe_grep() does the same, only it
doesn't support kwset and uses the callback diff_grep() instead.  Merge
the two functions to form the new diffcore_pickaxe() and thus get rid of
the duplicate regex setup and cleanup code.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diffcore-pickaxe.c