Skip to content

Commit 5b5275f

Browse files
committed
Merge branch 'maint'
* maint: xdiff: optimise for no whitespace difference when ignoring whitespace.
2 parents 869d588 + b4cf0f1 commit 5b5275f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

xdiff/xutils.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,10 @@ int xdl_recmatch(const char *l1, long s1, const char *l2, long s2, long flags)
190190
{
191191
int i1, i2;
192192

193+
if (s1 == s2 && !memcmp(l1, l2, s1))
194+
return 1;
193195
if (!(flags & XDF_WHITESPACE_FLAGS))
194-
return s1 == s2 && !memcmp(l1, l2, s1);
196+
return 0;
195197

196198
i1 = 0;
197199
i2 = 0;

0 commit comments

Comments
 (0)