Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

treefmt ignores files which are untracked but not gitignored #557

Closed
michaelpj opened this issue Mar 19, 2025 · 1 comment · Fixed by #560
Closed

treefmt ignores files which are untracked but not gitignored #557

michaelpj opened this issue Mar 19, 2025 · 1 comment · Fixed by #560
Labels
bug Something isn't working

Comments

@michaelpj
Copy link

Describe the bug

If you have a file which is not yet tracked by git, but which is not gitignored, then treefmt does not format it (because it doesn't show up in git ls-files).

I think this could be fixed by passing -o to git ls-files.

To Reproduce

Steps to reproduce the behavior:

  1. Add a new file
  2. Don't git add it
  3. Run treefmt

Expected behavior

I would expect it to be formatted.

@michaelpj michaelpj added the bug Something isn't working label Mar 19, 2025
brianmcgee added a commit that referenced this issue Mar 21, 2025
brianmcgee added a commit that referenced this issue Mar 21, 2025
@michaelpj
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant