From 4454fe9770d8a12a263501fedd996cc8a79896f1 Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Thu, 21 Oct 2021 14:02:51 +0200 Subject: [PATCH] pre-commit hook: don't unstage the entire file containing a style issue --- Tools/astyle/check_code_style.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/Tools/astyle/check_code_style.sh b/Tools/astyle/check_code_style.sh index 0e96f754d7..ed5bf7ff3c 100755 --- a/Tools/astyle/check_code_style.sh +++ b/Tools/astyle/check_code_style.sh @@ -16,8 +16,6 @@ if [ -f "$FILE" ]; then if [[ $PX4_ASTYLE_FIX -eq 1 ]]; then ${DIR}/fix_code_style.sh $FILE else - # Make sure this file is not staged for comitting - git reset $FILE # Provide instructions echo $FILE 'bad formatting, please run "make format" or "./Tools/astyle/fix_code_style.sh' $FILE'"' exit 1