summaryrefslogtreecommitdiff
path: root/t/t4051-diff-function-context.sh
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2017-11-18 18:05:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-11-21 00:36:06 (GMT)
commit5c3ed90f3f56757f2af9cc327313e9df2e38cdd5 (patch)
tree18536f2815d684b85023e479758cdd342e54641f /t/t4051-diff-function-context.sh
parentcde32bf62f74758d3bad685f9fef6aea4e10d106 (diff)
downloadgit-5c3ed90f3f56757f2af9cc327313e9df2e38cdd5.zip
git-5c3ed90f3f56757f2af9cc327313e9df2e38cdd5.tar.gz
git-5c3ed90f3f56757f2af9cc327313e9df2e38cdd5.tar.bz2
xdiff: show non-empty lines before functions with -W
Non-empty lines before a function definition are most likely comments for that function and thus relevant. Include them in function context. Such a non-empty line might also belong to the preceeding function if there is no separating blank line. Stop extending the context upwards also at the next function line to make sure only one extra function body is shown at most. Original-patch-by: Vegard Nossum <vegard.nossum@oracle.com> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4051-diff-function-context.sh')
-rwxr-xr-xt/t4051-diff-function-context.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t4051-diff-function-context.sh b/t/t4051-diff-function-context.sh
index 30fc5bf..2d76a97 100755
--- a/t/t4051-diff-function-context.sh
+++ b/t/t4051-diff-function-context.sh
@@ -85,7 +85,7 @@ test_expect_success 'setup' '
check_diff changed_hello 'changed function'
-test_expect_failure ' context includes comment' '
+test_expect_success ' context includes comment' '
grep "^ .*Hello comment" changed_hello.diff
'