mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 05:28:48 +00:00
pre-commit: Avoid prefixing string comparissons with x
This was working around bugs in various shells, but this problem has been fixed for a decade now. https://www.shellcheck.net/wiki/SC2268 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6652>
This commit is contained in:
parent
490deafcbe
commit
d72d79d85a
1 changed files with 5 additions and 5 deletions
|
@ -8,11 +8,11 @@
|
|||
# so check for that first.
|
||||
|
||||
version=$(gnuindent --version 2>/dev/null)
|
||||
if test "x$version" = "x"; then
|
||||
if test -z "$version"; then
|
||||
version=$(gindent --version 2>/dev/null)
|
||||
if test "x$version" = "x"; then
|
||||
if test -z "$version"; then
|
||||
version=$(indent --version 2>/dev/null)
|
||||
if test "x$version" = "x"; then
|
||||
if test -z "$version"; then
|
||||
echo "GStreamer git pre-commit hook:"
|
||||
echo "Did not find GNU indent, please install it before continuing."
|
||||
exit 1
|
||||
|
@ -92,9 +92,9 @@ echo "==========================================================================
|
|||
fi
|
||||
|
||||
csharp_files=$( git diff-index --cached --name-only HEAD --diff-filter=ACMR| grep "^subprojects/gstreamer-sharp/.*cs$" )
|
||||
if test "x$csharp_files" != "x"; then
|
||||
if test -n "$csharp_files"; then
|
||||
version=$(dotnet-format --version 2>/dev/null)
|
||||
if test "x$version" = "x"; then
|
||||
if test -z "$version"; then
|
||||
echo "GStreamer git pre-commit hook:"
|
||||
echo "Did not find dotnet-format required to format C# files, please install it before continuing."
|
||||
exit 1
|
||||
|
|
Loading…
Reference in a new issue