From: Eric Sunshine Date: Fri, 9 Aug 2013 21:39:54 +0000 (-0400) Subject: contacts: validate hunk length earlier X-Git-Tag: v1.8.5-rc0~163^2~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/9ae9ca1f95ccd3b4c1d62d856eb8b48fdff7c2d5?hp=9ae9ca1f95ccd3b4c1d62d856eb8b48fdff7c2d5 contacts: validate hunk length earlier Rather than calling get_blame() with a zero-length hunk only to have it rejected immediately, perform hunk-length validation earlier in order to avoid calling get_blame() unnecessarily. This is a preparatory step to simplify later patches which reduce the number of git-blame invocations by collecting together all lines to blame within a single file at a particular revision. By validating the blame range early, the subsequent patch can more easily avoid adding empty ranges at collection time. Signed-off-by: Eric Sunshine Signed-off-by: Junio C Hamano ---