Skip to content

Commit ae1aaa0

Browse files
committed
git: internal renames
1 parent 0e6c1ea commit ae1aaa0

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

eventum-git-hook.php

+9-5
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,11 @@
4747
require_once $configfile;
4848
}
4949

50-
// save name of this script
51-
$PROGRAM = basename(array_shift($argv));
52-
5350
$nullsha1 = '0000000000000000000000000000000000000000';
5451
$emptysha1 = '4b825dc642cb6eb9a060e54bf8d69288fbee4904';
5552

5653
$reflist = git_receive_refs();
54+
// process each branch push
5755
foreach ($reflist as $refs) {
5856
list($old, $new, $origin) = $refs;
5957
if ($new == $nullsha1) {
@@ -68,12 +66,18 @@
6866

6967
$revlist = git_rev_list($old, $new, '--no-merges --author-date-order --reverse');
7068
foreach ($revlist as $rev) {
71-
ping_eventum($old, $rev);
69+
git_scm_ping($old, $rev);
7270
$old = $rev;
7371
}
7472
}
7573

76-
function ping_eventum($oldrev, $rev)
74+
/**
75+
* Submit Git data to Eventum
76+
*
77+
* @param string $oldrev
78+
* @param string $rev
79+
*/
80+
function git_scm_ping($oldrev, $rev)
7781
{
7882
$commit_msg = git_commit_msg($rev);
7983
$issues = match_issues($commit_msg);

0 commit comments

Comments
 (0)