Skip to content

Commit 2fc4165

Browse files
committed
fix exclusion of ignored files
1 parent e35acf3 commit 2fc4165

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎src/main/java/com/dtsx/docs/core/planner/TestPlanBuilder.java‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,14 @@ private static Predicate<Path> buildGitignorePredicate(Path rootFolder) {
171171
line = line + "**";
172172
}
173173

174-
if (!line.startsWith("/")) {
174+
// Convert patterns like **/obj/* to **/obj/** to match all descendants
175+
if (line.endsWith("/*")) {
176+
line = line.substring(0, line.length() - 1) + "**";
177+
}
178+
179+
if (!line.startsWith("/") && !line.startsWith("**/")) {
175180
line = "**/" + line;
176-
} else {
181+
} else if (line.startsWith("/")) {
177182
line = line.substring(1);
178183
}
179184

0 commit comments

Comments
 (0)