mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-11 17:30:00 +01:00
forgejo: make aarch64 asm linter part of pre-commit
Needed some minor semantical changes to the shell wrapper, since pre-commit expects it to exit with an error when applying fixes.
This commit is contained in:
committed by
Martin Storsjö
parent
edd1b93e53
commit
4c80cda08a
@@ -39,12 +39,13 @@ for i in */aarch64/*.S */aarch64/*/*.S; do
|
||||
# Skip files with known (and tolerated) deviations from the tool.
|
||||
continue
|
||||
esac
|
||||
cat $i | ./tools/indent_arm_assembly.pl > tmp.S
|
||||
if [ -n "$apply" ]; then
|
||||
mv tmp.S $i
|
||||
continue
|
||||
fi
|
||||
if ! PAGER=cat git diff --no-index $i tmp.S; then
|
||||
./tools/indent_arm_assembly.pl < "$i" > tmp.S || ret=$?
|
||||
if ! git diff --quiet --no-index "$i" tmp.S; then
|
||||
if [ -n "$apply" ]; then
|
||||
mv tmp.S "$i"
|
||||
else
|
||||
git --no-pager diff --no-index "$i" tmp.S
|
||||
fi
|
||||
ret=1
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user