You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When formatting rust files with genemichaels, the timestamp of the file is always modified whether or not the file was changed.
This is problematic for detecting whether a file has been reformatted or not, such as when using tools such as pre-commit, treefmt, and treefmt-nix.
When formatting files, genemichaels always writes the formatted file to
disk which modifies the file timestamp. This is problematic for tools
that detect whether a file has been reformatted or not.
This commit changes the behavior by comparing the source against the
formatted output and only writing to disk if they are different.
See: andrewbaxter#95
When formatting rust files with `genemichaels`, the timestamp of the
file is always modified whether or not the file was changed. This is
problematic for detecting whether a file has been reformatted or not,
such as when using tools such as `pre-commit`, `treefmt`, and
`treefmt-nix`.
See the following:
andrewbaxter/genemichaels#95andrewbaxter/genemichaels#96numtide/treefmt-nix#277
When formatting rust files with genemichaels, the timestamp of the file is always modified whether or not the file was changed.
This is problematic for detecting whether a file has been reformatted or not, such as when using tools such as pre-commit, treefmt, and treefmt-nix.
I have a fix and will submit a PR.
Similar issues:
numtide/treefmt-nix#265
casey/just#2478
The text was updated successfully, but these errors were encountered: