This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository maintenancescripts. from ff3f10f git/hooks/update-irkerhook_only: generically recognize SHA1 and SHA256 NULL (pseudo) hashes via a regular expression. new 50e156b git/hooks/update-script._irkerhook.py_: generate list of changed files for exclusively new commits when detecting a new branch/tag (via --new=true) and spit out a pseudo-log message only. new e3440f1 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. The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: git/hooks/update-irkerhook_only | 7 ++++++- git/hooks/update-script._irkerhook.py_ | 10 +++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository maintenancescripts. commit 50e156b55509af60da8f2467e86be50bc43589a2 Author: Mihai Moldovan <ionic@ionic.de> Date: Thu Jan 2 10:25:58 2020 +0100 git/hooks/update-script._irkerhook.py_: generate list of changed files for exclusively new commits when detecting a new branch/tag (via --new=true) and spit out a pseudo-log message only. This also includes a modified, rebase-like URL. --- git/hooks/update-script._irkerhook.py_ | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/git/hooks/update-script._irkerhook.py_ b/git/hooks/update-script._irkerhook.py_ index b4dda10..0661e6a 100755 --- a/git/hooks/update-script._irkerhook.py_ +++ b/git/hooks/update-script._irkerhook.py_ @@ -334,7 +334,11 @@ class GitExtractor(GenericExtractor): commit.commit = commit.rev # Extract the meta-information for the commit parent = '' - if self.rebase == '': + if self.new: + # Generate a list of changed files that are part of uniquely new commits. + parent = do("git rev-list --reverse -n 1 " + shellquote(commit.commit) + " --not --branches=" + shellquote("*") + " --tags=" + shellquote("*")) + commit.files = do("git diff-tree -r --name-only " + shellquote(parent) + " " + shellquote(commit.commit)) + elif self.rebase == '': commit.files = do("git diff-tree -r --name-only " + shellquote(commit.commit)) else: parent = do("git merge-base " + shellquote(self.rebase) + " " + shellquote(commit.commit)) @@ -359,7 +363,7 @@ class GitExtractor(GenericExtractor): if self.new: ref_type = re.sub(r"^refs/([^/])*/.*", '\1', self.refname) ref_type_dict = { "heads": "branch", "tags": "tag" } - commit.logmsg = u"{0}{1}".format((u"%(cyan)sNew " + ref_type_dict.get(ref_type, "unknown target") + " \"" + commit.branch +"\" created.%(reset)s Original commit description follows:\n") % self.__dict__, commit.logmsg) + commit.logmsg = (u"%(cyan)sNew " + ref_type_dict.get(ref_type, "unknown target") + " \"" + commit.branch +"\" created.%(reset)s New commit description(s) follow:\n") % self.__dict__ # This discards the part of the author's address after @. # Might be be nice to ship the full email address, if not # for spammers' address harvesters - getting this wrong @@ -367,7 +371,7 @@ class GitExtractor(GenericExtractor): commit.author = commit.mail.split("@")[0] commit.author_date, commit.commit_date = \ do("git log -1 '--pretty=format:%ai|%ci' " + shellquote(commit.commit)).split("|") - if self.rebase != '': + if self.rebase != '' or self.new: commit.commit = commit.commit + ";hb=" + parent return commit -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git
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@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