Skip to content

Commit 12c7c39

Browse files
committed
Diffusion - fix first "old ref" in push log
Summary: This is a fake hash of many 0s which ends up being a bad link. Detect the fake hash and don't print a link. Fixes T6826. Test Plan: looked at push log and no longer saw a many 0 entry for the first old ref. Reviewers: epriestley, chad Reviewed By: chad Subscribers: Korvin, epriestley Maniphest Tasks: T6826 Differential Revision: https://secure.phabricator.com/D11096
1 parent 1c04532 commit 12c7c39

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/applications/diffusion/view/DiffusionPushLogListView.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@ public function render() {
5252
$event_id = $log->getPushEvent()->getID();
5353

5454
$callsign = $log->getRepository()->getCallsign();
55+
$old_ref_link = null;
56+
if ($log->getRefOld() != DiffusionCommitHookEngine::EMPTY_HASH) {
57+
$old_ref_link = phutil_tag(
58+
'a',
59+
array(
60+
'href' => '/r'.$callsign.$log->getRefOld(),
61+
),
62+
$log->getRefOldShort());
63+
}
5564
$rows[] = array(
5665
phutil_tag(
5766
'a',
@@ -70,12 +79,7 @@ public function render() {
7079
$log->getPushEvent()->getRemoteProtocol(),
7180
$log->getRefType(),
7281
$log->getRefName(),
73-
phutil_tag(
74-
'a',
75-
array(
76-
'href' => '/r'.$callsign.$log->getRefOld(),
77-
),
78-
$log->getRefOldShort()),
82+
$old_ref_link,
7983
phutil_tag(
8084
'a',
8185
array(

0 commit comments

Comments
 (0)