Skip to content

Commit

Permalink
#1672: improve post-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
cz4rs committed Mar 22, 2022
1 parent 4505f70 commit 2c57617
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/post-commit
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
# every commit.
# Prints the resulting changes if there are any.

# don't run the action during rebase
if ! [[ $(git branch --show-current) ]]
then
exit
fi

output=$(git clang-format HEAD~1)

if [ "$output" != "" ]
Expand Down

0 comments on commit 2c57617

Please sign in to comment.