mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-18 03:30:55 +01:00
@@ -414,6 +414,9 @@ class Repository
|
||||
public function getHead()
|
||||
{
|
||||
$file = file_get_contents($this->getPath() . '/.git/HEAD');
|
||||
if ($file === FALSE) {
|
||||
$file = file_get_contents($this->getPath() . '/HEAD');
|
||||
}
|
||||
foreach (explode("\n", $file) as $line) {
|
||||
$m = array();
|
||||
if (preg_match('#ref:\srefs/heads/(.+)#', $line, $m)) {
|
||||
|
||||
Reference in New Issue
Block a user