Skip to content

Commit

Permalink
fixup! fix: non-ascii paths in git walker
Browse files Browse the repository at this point in the history
Signed-off-by: Brian McGee <[email protected]>
  • Loading branch information
brianmcgee committed Nov 29, 2024
1 parent 4264928 commit d5a39b0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion cmd/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,12 @@ func TestAllowMissingFormatter(t *testing.T) {
treefmt(t,
withArgs("--allow-missing-formatter"),
withNoError(t),
withStats(t, map[stats.Type]int{
stats.Traversed: 33,
stats.Matched: 0,
stats.Formatted: 0,
stats.Changed: 0,
}),
)
})

Expand Down Expand Up @@ -1346,7 +1352,7 @@ func TestGit(t *testing.T) {
withStats(t, map[stats.Type]int{
stats.Traversed: 82,
stats.Matched: 82,
stats.Formatted: 51, // the echo formatter should only be applied to the new files
stats.Formatted: 50, // the echo formatter should only be applied to the new files
stats.Changed: 0,
}),
)
Expand Down
2 changes: 1 addition & 1 deletion test/examples/emoji 🕰️/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Hello World
# Hello World
2 changes: 1 addition & 1 deletion walk/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ LOOP:

files[n] = &File{
Path: path,
RelPath: filepath.Join(g.path, g.scanner.Text()),
RelPath: filepath.Join(g.path, entry),
Info: info,
}
n++
Expand Down

0 comments on commit d5a39b0

Please sign in to comment.