Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2016-05-28 18:04:31 +0300
committerJunio C Hamano <gitster@pobox.com>2016-05-31 23:08:56 +0300
commite0876bca4de44638a1cb51b03bdf0a40df631a80 (patch)
treeeb3fd50f21adb94deee1823a68467b43cb002e3b /t/t4051-diff-function-context.sh
parent9e6a4cfc38aa81055d0b7d6fb94dc7b31809daa9 (diff)
xdiff: don't trim common tail with -W
The function trim_common_tail() exits early if context lines are requested. If -U0 and -W are specified together then it can still trim context lines that might belong to a changed function. As a result that function is shown incompletely. Fix that by calling trim_common_tail() only if no function context or fixed context is requested. The parameter ctx is no longer needed now; remove it. While at it fix an outdated comment as well. 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 17616fe582..b6bb04ab82 100755
--- a/t/t4051-diff-function-context.sh
+++ b/t/t4051-diff-function-context.sh
@@ -145,7 +145,7 @@ test_expect_success ' context includes begin' '
grep "^ .*Begin of first part" long_common_tail.diff
'
-test_expect_failure ' context includes end' '
+test_expect_success ' context includes end' '
grep "^ .*End of second part" long_common_tail.diff
'