mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 18:47:21 +08:00
pre-commit hook: don't unstage the entire file containing a style issue
This commit is contained in:
committed by
Daniel Agar
parent
19952768fb
commit
4454fe9770
@@ -16,8 +16,6 @@ if [ -f "$FILE" ]; then
|
|||||||
if [[ $PX4_ASTYLE_FIX -eq 1 ]]; then
|
if [[ $PX4_ASTYLE_FIX -eq 1 ]]; then
|
||||||
${DIR}/fix_code_style.sh $FILE
|
${DIR}/fix_code_style.sh $FILE
|
||||||
else
|
else
|
||||||
# Make sure this file is not staged for comitting
|
|
||||||
git reset $FILE
|
|
||||||
# Provide instructions
|
# Provide instructions
|
||||||
echo $FILE 'bad formatting, please run "make format" or "./Tools/astyle/fix_code_style.sh' $FILE'"'
|
echo $FILE 'bad formatting, please run "make format" or "./Tools/astyle/fix_code_style.sh' $FILE'"'
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user