🔧 chore(pre-commit): add git add command to pre-commit hook
The pre-commit hook now adds the files that were formatted by the make format command to the staging area. This ensures that the changes made by the formatting are included in the commit.
This commit is contained in:
parent
38d0c9b170
commit
a4312158fa
1 changed files with 5 additions and 1 deletions
|
|
@ -1,2 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
make format
|
||||
added_files=$(git diff --name-only --cached --diff-filter=d)
|
||||
|
||||
make format
|
||||
git add ${added_files}
|
||||
Loading…
Add table
Add a link
Reference in a new issue