[sysadmin-bin] Tabs to spaces, indent fixes
- From: Andrea Veri <averi src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] Tabs to spaces, indent fixes
- Date: Fri, 10 Sep 2021 10:21:46 +0000 (UTC)
commit 066d35d19c88b8f3019b6b7111a75f6cd5cf8a2c
Author: Andrea Veri <averi redhat com>
Date: Fri Sep 10 12:21:37 2021 +0200
Tabs to spaces, indent fixes
git/pre-receive-check-po | 82 ++++++++++++++++++++++++------------------------
1 file changed, 41 insertions(+), 41 deletions(-)
---
diff --git a/git/pre-receive-check-po b/git/pre-receive-check-po
index 7622e0e..33fb782 100755
--- a/git/pre-receive-check-po
+++ b/git/pre-receive-check-po
@@ -8,11 +8,11 @@ check_po() {
mode=$3
case "$path" in
- *.po)
- ;;
- *)
- return
- ;;
+ *.po)
+ ;;
+ *)
+ return
+ ;;
esac
basename=`basename $path`
@@ -24,7 +24,7 @@ check_po() {
# Parse the file and check for errors
result=`git cat-file blob "$rev:$path" | msgfmt $dash_c -o /dev/null - 2>&1`
if [ $? -gt 0 ]; then
- cat <<EOF >&2
+ cat <<EOF >&2
$GITLAB_ERR_PREFIX
---
The following translation (.po) file appears to be invalid.$branch_message
@@ -47,7 +47,7 @@ git commit --amend
If you have any further problems or questions, please contact the GNOME Translation Project mailing list
<gnome-i18n gnome org>. Thank you.
---
EOF
- exit 1
+ exit 1
fi
# Do a simplistic check to for keyword not ending with a semicolon
@@ -55,7 +55,7 @@ EOF
# ovitters: disable as check is wrong
result=""
if [ "$result" != "" ]; then
- cat <<EOF >&2
+ cat <<EOF >&2
$GITLAB_ERR_PREFIX
---
The following translation (.po) file should ensure the translated content ends with a
semicolon.$branch_message
@@ -74,12 +74,12 @@ git commit --amend
If you have any further problems or questions, please contact the GNOME Translation Project mailing list
<gnome-i18n gnome org>. Thank you.
---
EOF
- exit 1
+ exit 1
fi
# Check for the absence of an executable flag
if expr "$mode" : ".*\([1357]..\|[1357].\|[1357]\)$" > /dev/null 2>& 1; then
- cat <<EOF >&2
+ cat <<EOF >&2
$GITLAB_ERR_PREFIX
---
The following translation file appears to have its executable flag set.$branch_message
@@ -95,7 +95,7 @@ git commit --amend
If you have any further problems or questions, please contact the GNOME Translation Project mailing list
<gnome-i18n gnome org>. Thank you.
---
EOF
- exit 1
+ exit 1
fi
}
@@ -111,47 +111,47 @@ check_pos() {
branchname=${refname#refs/heads/}
if [ "$branchname" = "$refname" ] ; then
# not a branch update
- return
+ return
fi
branch_message=
if [ "$branchname" != "$mainline" ] ; then
- branch_message=" (When updating branch '$branchname'.)"
+ branch_message=" (When updating branch '$branchname'.)"
fi
if expr $newrev : "^0\+$" > /dev/null 2>&1; then
# Branch deletion, nothing to check
- return 0
+ return 0
fi
if expr $oldrev : "^0\+$" > /dev/null 2>&1; then
- # Branch creation
- git ls-tree -r $newrev | (
- while read mode objtype sha path ; do
- if [ $objtype = blob ] ; then
- check_po $newrev $path $mode
- fi
- done
- )
+ # Branch creation
+ git ls-tree -r $newrev | (
+ while read mode objtype sha path ; do
+ if [ $objtype = blob ] ; then
+ check_po $newrev $path $mode
+ fi
+ done
+ )
else
- # Branch update
- git diff-tree -r $oldrev $newrev | (
- while read srcmode destmode srcsha destsha status srcpath destpath ; do
- if [ $status = 'D' ] ; then
- continue # deleted
- fi
-
- # destpath only present for copies/renames
- if [ x"$destpath" = x ] ; then
- destpath=$srcpath
- fi
-
- # Strip colon from the source mode
- srcmode=${srcmode#:}
-
- check_po $newrev $destpath $destmode
- done
- )
+ # Branch update
+ git diff-tree -r $oldrev $newrev | (
+ while read srcmode destmode srcsha destsha status srcpath destpath ; do
+ if [ $status = 'D' ] ; then
+ continue # deleted
+ fi
+
+ # destpath only present for copies/renames
+ if [ x"$destpath" = x ] ; then
+ destpath=$srcpath
+ fi
+
+ # Strip colon from the source mode
+ srcmode=${srcmode#:}
+
+ check_po $newrev $destpath $destmode
+ done
+ )
fi
}
@@ -171,6 +171,6 @@ if [ $# = 3 ] ; then
check_pos $@ || exit 1
else
while read oldrev newrev refname; do
- check_pos $oldrev $newrev $refname || exit 1
+ check_pos $oldrev $newrev $refname || exit 1
done
fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]