|
|
|
@ -96,6 +96,21 @@ class GitRepository
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function GetBranches()
|
|
|
|
|
{
|
|
|
|
|
$branches = array();
|
|
|
|
|
|
|
|
|
|
foreach(scandir("{$this->path}/refs/heads/") as $branch)
|
|
|
|
|
{
|
|
|
|
|
if($branch != "." && $branch != "..")
|
|
|
|
|
{
|
|
|
|
|
$branches[$branch] = $this->GetBranch($branch);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $branches;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function GetTag($name)
|
|
|
|
|
{
|
|
|
|
|
$filename = "{$this->path}/refs/tags/{$name}";
|
|
|
|
@ -111,6 +126,21 @@ class GitRepository
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function GetTags()
|
|
|
|
|
{
|
|
|
|
|
$tags = array();
|
|
|
|
|
|
|
|
|
|
foreach(scandir("{$this->path}/refs/tags/") as $tag)
|
|
|
|
|
{
|
|
|
|
|
if($tag != "." && $tag != "..")
|
|
|
|
|
{
|
|
|
|
|
$tags[$tag] = $this->GetTag($tag);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $tags;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function GetObjectForPath($origin, $path)
|
|
|
|
|
{
|
|
|
|
|
$path_parts = explode("/", $path);
|
|
|
|
|