Merge branch 'rs/include-comments-before-the-function-header'
authorJunio C Hamano <gitster@pobox.com>
Tue, 28 Nov 2017 04:41:50 +0000 (13:41 +0900)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 Nov 2017 04:41:50 +0000 (13:41 +0900)
commitf03490164811f19c8d2222a658398d67b14e905d
tree0427ffa7fee9b19daeb2bf0c92986a27ea9724d2
parent3b49e1b0e900a88cab9e1b035dac83c0dd6ae2b3
parenta5dc20b0701cee53b2c37a4aa3a339b48d5bb298
Merge branch 'rs/include-comments-before-the-function-header'

"git grep -W", "git diff -W" and their friends learned a heuristic
to extend a pre-context beyond the line that matches the "function
pattern" (aka "diff.*.xfuncname") to include a comment block, if
exists, that immediately precedes it.

* rs/include-comments-before-the-function-header:
  grep: show non-empty lines before functions with -W
  grep: update boundary variable for pre-context
  t7810: improve check of -W with user-defined function lines
  xdiff: show non-empty lines before functions with -W
  xdiff: factor out is_func_rec()
  t4051: add test for comments preceding function lines