Skip to content

Commit 35844bb

Browse files
committed
Properly account for filters starting with the ! ignore character
1 parent 7e47698 commit 35844bb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/main/java/net/minecraftforge/gitver/internal/GitVersionImpl.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,12 @@ private Info calculateInfo(CommitCountProvider commitCountProvider) {
130130
else
131131
it.setExclude("*-*");
132132

133-
for (String filter : this.filters)
134-
it.setMatch(filter);
133+
for (String filter : this.filters) {
134+
if (filter.startsWith("!"))
135+
it.setExclude(filter.substring(1));
136+
else
137+
it.setMatch(filter);
138+
}
135139
} catch (Exception e) {
136140
Util.sneak(e);
137141
}

0 commit comments

Comments
 (0)