🔧 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:
Gabriel Almeida 2023-05-31 01:04:40 -03:00
commit a4312158fa

View file

@ -1,2 +1,6 @@
#!/bin/sh
make format
added_files=$(git diff --name-only --cached --diff-filter=d)
make format
git add ${added_files}