summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2010-07-05 23:33:07 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-07-05 23:33:07 -0700
commit5b5275f6e9ca6284ca123f729d5a78f409e448fb (patch)
tree8b0303c1af1c2e051155bac15b40dc7c0ee450ae
parentgitweb: Move evaluate_gitweb_config out of run_request (diff)
parentxdiff: optimise for no whitespace difference when ignoring whitespace. (diff)
downloadtgif-5b5275f6e9ca6284ca123f729d5a78f409e448fb.tar.xz
Merge branch 'maint'
* maint: xdiff: optimise for no whitespace difference when ignoring whitespace.
-rw-r--r--xdiff/xutils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xdiff/xutils.c b/xdiff/xutils.c
index bc12f29895..22f9bd692c 100644
--- a/xdiff/xutils.c
+++ b/xdiff/xutils.c
@@ -190,8 +190,10 @@ int xdl_recmatch(const char *l1, long s1, const char *l2, long s2, long flags)
{
int i1, i2;
+ if (s1 == s2 && !memcmp(l1, l2, s1))
+ return 1;
if (!(flags & XDF_WHITESPACE_FLAGS))
- return s1 == s2 && !memcmp(l1, l2, s1);
+ return 0;
i1 = 0;
i2 = 0;