* Returns true when the file path matches the extension filter (or no filter set).
(filePath: string, extSet: Set<string> | null)
| 133 | * Returns true when the file path matches the extension filter (or no filter set). |
| 134 | */ |
| 135 | function matchesExtension(filePath: string, extSet: Set<string> | null): boolean { |
| 136 | if (!extSet) return true |
| 137 | const lastDot = filePath.lastIndexOf('.') |
| 138 | if (lastDot === -1) return false |
| 139 | return extSet.has(filePath.slice(lastDot).toLowerCase()) |
| 140 | } |
| 141 | |
| 142 | /** |
| 143 | * Strips the `refs/heads/` prefix from a default-branch ref so it can be used as |