@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
at upstream/main 22 lines 472 B view raw
1<?php 2 3final class DiffusionGitRequest extends DiffusionRequest { 4 5 protected function isStableCommit($symbol) { 6 if ($symbol === null) { 7 return false; 8 } 9 return preg_match('/^[a-f0-9]{40}\z/', $symbol); 10 } 11 12 public function getBranch() { 13 if ($this->branch) { 14 return $this->branch; 15 } 16 if ($this->repository) { 17 return $this->repository->getDefaultBranch(); 18 } 19 throw new Exception(pht('Unable to determine branch!')); 20 } 21 22}