23 lines
305 B
PHP
23 lines
305 B
PHP
<?php
|
|
class GitBranch
|
|
{
|
|
public $sha = "";
|
|
public $repo = null;
|
|
|
|
function __construct($repo, $sha)
|
|
{
|
|
$this->repo = $repo;
|
|
$this->sha = $sha;
|
|
}
|
|
|
|
function GetLastCommit()
|
|
{
|
|
return $this->repo->GetObject($this->sha);
|
|
}
|
|
|
|
function GetTree()
|
|
{
|
|
return $this->GetLastCommit()->GetTree();
|
|
}
|
|
}
|