From: Jeff King Date: Sun, 28 Oct 2012 12:34:06 +0000 (-0400) Subject: pickaxe: hoist empty needle check X-Git-Tag: v1.8.1-rc0~23^2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/8fa4b09fb14339c5d62e65a88fde8b220cb1591b?hp=8fa4b09fb14339c5d62e65a88fde8b220cb1591b pickaxe: hoist empty needle check If we are given an empty pickaxe needle like "git log -S ''", it is impossible for us to find anything (because no matter what the content, the count will always be 0). We currently check this at the lowest level of contains(). Let's hoist the logic much earlier to has_changes(), so that it is simpler to return our answer before loading any blob data. Signed-off-by: Jeff King ---