[X2Go-Commits] [maintenancescripts] 04/06: git/hooks/x2go-post-receive-tag-pending: change tabs to spaces, add quoting and curly braces around variables in big block.

git-admin at x2go.org git-admin at x2go.org
Mon Feb 23 21:55:28 CET 2015


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository maintenancescripts.

commit 11e5f3f29e0206d3d9f4e5bd68a6044f988e4bde
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Mon Feb 23 21:53:41 2015 +0100

    git/hooks/x2go-post-receive-tag-pending: change tabs to spaces, add quoting and curly braces around variables in big block.
---
 git/hooks/x2go-post-receive-tag-pending |   38 +++++++++++++++----------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/git/hooks/x2go-post-receive-tag-pending b/git/hooks/x2go-post-receive-tag-pending
index 138815e..2a931e1 100755
--- a/git/hooks/x2go-post-receive-tag-pending
+++ b/git/hooks/x2go-post-receive-tag-pending
@@ -68,25 +68,25 @@ EOF
 }
 
 while read oldrev newrev refname; do
-	if echo $refname | egrep -v "refs/tags/" >/dev/null && echo $refname | egrep "refs/heads/(master|release/.*)" >/dev/null; then
-		git rev-parse --not | grep -v $(git rev-parse $refname) |
-		git rev-list --reverse --stdin "${oldrev}..${newrev}" |
-		while read rev; do
-			c="$tempdir/$rev.changelog"
-			d="$tempdir/$rev.diff"
-			git show ${rev}:debian/changelog >"$c" 2>/dev/null
-			git show ${rev} -- debian/changelog >"$d"
-			version=`cat "$c" | sed 's/Fixes:/Closes:/i' | dpkg-parsechangelog -l- | sed -rne 's/^Version: *//pi' -e 's/[0-9]+://' | cut -d"-" -f1`
-			bugs=`cat "$c" | sed 's/Fixes:/Closes:/i' | dpkg-parsechangelog -l- | sed -rne 's/^Closes: *//pi'`
-			for bug in $bugs; do
-				if  grep -qE '^\+.*\<'$bug'\>' "$d" &&
-				    ! grep -qE  '^-.*\<'$bug'\>' "$d"; then
-					info "Marking X2Go issue #$bug as pending for release ($version)."
-					send_mail $bug "$version" "$rev" "$d"
-				fi
-			done
-		done
-	fi
+  if echo "${refname}" | egrep -v "refs/tags/" >/dev/null && echo "${refname}" | egrep "refs/heads/(master|release/.*)" >/dev/null; then
+    git rev-parse --not | grep -v "$(git rev-parse ${refname})" | \
+    git rev-list --reverse --stdin "${oldrev}..${newrev}" | \
+    while read rev; do
+      c="${tempdir}/${rev}.changelog"
+      d="${tempdir}/${rev}.diff"
+      git show "${rev}:debian/changelog" >"${c}" 2>/dev/null
+      git show "${rev}" -- "debian/changelog" >"${d}"
+      version=$(cat "${c}" | sed 's/Fixes:/Closes:/i' | dpkg-parsechangelog -l- | sed -rne 's/^Version: *//pi' -e 's/[0-9]+://' | cut -d"-" -f1)
+      bugs=$(cat "${c}" | sed 's/Fixes:/Closes:/i' | dpkg-parsechangelog -l- | sed -rne 's/^Closes: *//pi')
+      for bug in ${bugs}; do
+        if  grep -qE '^\+.*\<'"${bug}"'\>' "${d}" &&
+            ! grep -qE  '^-.*\<'"${bug}"'\>' "${d}"; then
+          info "Marking X2Go issue #${bug} as pending for release (${version})."
+          send_mail "${bug}" "${version}" "${rev}" "${d}"
+        fi
+      done
+    done
+  fi
 done
 
 # vi: et

--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git


More information about the x2go-commits mailing list