Skip to content

Commit f3de46b

Browse files
committed
Allow cycles in DiffTrees
The variation diff with a maximal matching (#ifdef A and #ifdef B are both matched) of the following diff contains a cycle. ```diff -#ifdef B #ifdef A +#ifdef B Line ```
1 parent 06ba91d commit f3de46b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/main/java/org/variantsync/diffdetective/variation/diff

src/main/java/org/variantsync/diffdetective/variation/diff/DiffTree.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ public boolean test(final DiffNode d) {
446446
}
447447
// We detected a cycle because we visited a node but did not determine its value yet!
448448
// Thus, we are stuck in a recursion.
449-
case VISITED -> false;
449+
case VISITED -> true;
450450
case ALL_PATHS_END_AT_ROOT -> true;
451451
case NOT_ALL_PATHS_END_AT_ROOT -> false;
452452
};

0 commit comments

Comments
 (0)