Skip to content

Commit c0df93d

Browse files
AlexanderSchultheisspmbittner
authored andcommitted
fix: diffs are now analyzed if they match a filter criterion either before or after a change
1 parent a378493 commit c0df93d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/org/variantsync/diffdetective/diff/git/DiffFilter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ public boolean filter(PatchDiff patchDiff) {
258258
*/
259259
public boolean filter(DiffEntry diffEntry) {
260260
if (!allowedPaths.isEmpty() &&
261-
!(isAllowedPath(diffEntry.getOldPath()) && isAllowedPath(diffEntry.getNewPath())))
261+
!(isAllowedPath(diffEntry.getOldPath()) || isAllowedPath(diffEntry.getNewPath())))
262262
{
263263
return false;
264264
}
@@ -273,7 +273,7 @@ public boolean filter(DiffEntry diffEntry) {
273273
return false;
274274
}
275275
if (!allowedFileExtensions.isEmpty() &&
276-
!(hasAllowedExtension(diffEntry.getOldPath()) && hasAllowedExtension(diffEntry.getNewPath())))
276+
!(hasAllowedExtension(diffEntry.getOldPath()) || hasAllowedExtension(diffEntry.getNewPath())))
277277
{
278278
return false;
279279
}

0 commit comments

Comments
 (0)