Closed
Description
Pre-commit is widely used and one of the standard approaches is to call a tool with a list of modified files to process. It's pretty common across unix for commands to accept a list of files.
At the moment between cargo fmt
and rustfmt
there doesn't seem to be a nice way to have pre-commit just run the formatter against just the files that have changed rather than all the files. We can do it by writing some python wrapper around rustfmt but it would be nice if we could just use it out of the box.