pickaxe: call strlen only when necessary in diffcore_pickaxe_count()
commit542b2aa2c9afba71febb248edb3083ff9cacf065
authorRené Scharfe <l.s.r@web.de>
Sat, 22 Mar 2014 17:15:59 +0000 (22 18:15 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 24 Mar 2014 22:13:17 +0000 (24 15:13 -0700)
tree1bc08a524b682127f4502e28a221129d94deb1d8
parent3753bd1f69d3b17e0369390fb8960ae3b7855b70
pickaxe: call strlen only when necessary in diffcore_pickaxe_count()

We need to determine the search term's length only when fixed-string
matching is used; regular expression compilation takes a NUL-terminated
string directly.  Only call strlen() in the former case.

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