mirror of
https://github.com/deepspeedai/DeepSpeed.git
synced 2025-10-20 15:33:51 +08:00
Only run pre-commit on the changes (#7106)
Run pre-commit on all files may change files that are not part of the current branch. The updated script will only run pre-commit on the files that have been changed in the current branch. Signed-off-by: Hongwei <hongweichen@microsoft.com>
This commit is contained in:
@ -13,7 +13,7 @@ pre-commit install
|
||||
Afterwards, our suite of formatting tests run automatically before each `git commit`. You
|
||||
can also run these manually:
|
||||
```bash
|
||||
pre-commit run --all-files
|
||||
pre-commit run --files $(git diff --name-only master)
|
||||
```
|
||||
If a formatting test fails, it will fix the modified code in place and abort
|
||||
the `git commit`. After looking over the changes, you can `git add <modified files>`
|
||||
|
Reference in New Issue
Block a user