Skip to content

git: format only files that changed #311

Description

@zimbatm

Is your feature request related to a problem? Please describe.

When introducing a "dirty" project to treefmt, it can create a lot of code churn as files that previously weren't formatted are now getting changed. You often end up with a fat commit that formats the whole repo and breaks git blame.

Describe the solution you'd like

When the file backend is git, only format the untrack and changed files by default.

Add a --all-files flag to override that default.

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions