Skip to content

Commit 1259c9d

Browse files
committed
Fix Windows .gitignore parsing
1 parent 2cb3cc9 commit 1259c9d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/gitignore.zig

+2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ pub const IgnoreTracker = struct {
3535
var line = split.next();
3636

3737
while (line != null) : (line = split.next()) {
38+
// remove stray \r characters from Windows line endings
39+
line = std.mem.trimRight(u8, line.?, "\r");
3840
if (line.?.len == 0) continue;
3941
switch (line.?[0]) {
4042
// comment

0 commit comments

Comments
 (0)