[X2Go-Commits] [maintenancescripts] 07/08: git/hooks/x2go-post-receive-tag-pending: rework git rev-list call into something less duplicated.

git-admin at x2go.org git-admin at x2go.org
Tue Mar 3 14:25:53 CET 2020


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

x2go pushed a commit to branch master
in repository maintenancescripts.

commit d7d6d9f71645eb8190186d6ab4bed8b9085723ff
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Tue Mar 3 13:49:06 2020 +0100

    git/hooks/x2go-post-receive-tag-pending: rework git rev-list call into something less duplicated.
---
 git/hooks/x2go-post-receive-tag-pending | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/git/hooks/x2go-post-receive-tag-pending b/git/hooks/x2go-post-receive-tag-pending
index a7311b3..cf6ac94 100755
--- a/git/hooks/x2go-post-receive-tag-pending
+++ b/git/hooks/x2go-post-receive-tag-pending
@@ -119,11 +119,13 @@ EOF
 
 while read oldrev newrev refname; do
   typeset -a git_rev_list
-  git_rev_list=( 'git' 'rev-list' '--reverse' '--stdin' "${oldrev}..${newrev}" )
+  git_rev_list=( 'git' 'rev-list' '--reverse' '--stdin' )
   # For new branches/tags, do something special. Hopefully.
   typeset null_regex='^0{20,}$'
   if [[ "${oldrev}" =~ ${null_regex} ]]; then
-    git_rev_list=( 'git' 'rev-list' '--reverse' '--stdin' "${newrev}" )
+    git_rev_list+=( "${newrev}" )
+  else
+    git_rev_list+=( "${oldrev}..${newrev}" )
   fi
   # Be careful with the "git rev-parse" line.
   # It is supposed to filter out any commits that are already part of a (different) branch or tag,

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


More information about the x2go-commits mailing list