[X2Go-Commits] [maintenancescripts] 02/02: git/hooks/update-irkerhook_only: for new branches/tags, write out an initial message containing a file change summary for all exclusively new commits and then handle each exclusively new commit in the usual way.

git-admin at x2go.org git-admin at x2go.org
Thu Jan 2 10:35:25 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 e3440f13012aa1029a89cc791e611d641ad3dc06
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Thu Jan 2 10:30:09 2020 +0100

    git/hooks/update-irkerhook_only: for new branches/tags, write out an initial message containing a file change summary for all exclusively new commits and then handle each exclusively new commit in the usual way.
---
 git/hooks/update-irkerhook_only | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/git/hooks/update-irkerhook_only b/git/hooks/update-irkerhook_only
index c723f3e..7c78a16 100755
--- a/git/hooks/update-irkerhook_only
+++ b/git/hooks/update-irkerhook_only
@@ -32,7 +32,12 @@ else
 fi
 
 if [ '1' -eq "${new}" ]; then
-  "${OUTSIDE_REPO}/update-script._irkerhook.py_" --refname="${REFNAME}" "${cur_rev}" --new=true --repo="${SHORT_GIT_REPO_NAME}" || :
+  # For new branches and tags, we want to log all commits that are exclusively
+  # new to this branch or tag.
+  "${OUTSIDE_REPO}/update-script._irkerhook.py_" --refname="${REFNAME}" "${NEW}" --new=true --repo="${SHORT_GIT_REPO_NAME}" || :
+  git rev-list --reverse "${NEW}" --not --branches='*' --tags='*' | while read cur_rev; do
+    "${OUTSIDE_REPO}/update-script._irkerhook.py_" --refname="${REFNAME}" "${cur_rev}" --repo="${SHORT_GIT_REPO_NAME}" || :
+  done
 else
   if [ "${ff}" -eq "1" ] && [ "${merge}" -eq "0" ]; then
     git rev-list --reverse "${OLD}..${NEW}" | while read cur_rev; do

--
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