mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
ci_template: Use git diff --quiet for checking for changes
Checking the exit code of git diff --quiet is preferred over looking whether git diff produces any output.
This commit is contained in:
parent
5b664cd00f
commit
4493ab0bb8
1 changed files with 3 additions and 3 deletions
|
@ -46,12 +46,12 @@ gst indent:
|
|||
- chmod +x gst-indent
|
||||
- find . -name '*.c' -exec ./gst-indent {} +
|
||||
- |
|
||||
if [[ $(git diff) ]]; then
|
||||
if git diff --quiet; then
|
||||
echo "Code is properly formatted"
|
||||
else
|
||||
git diff --color=always
|
||||
echo 'style diverges, please run gst-indent first'
|
||||
exit 1
|
||||
else
|
||||
echo "Code is properly formatted"
|
||||
fi
|
||||
except:
|
||||
variables:
|
||||
|
|
Loading…
Reference in a new issue