From 1a3a81adadd2f9c91e8fe8e18d3363e067041b4d Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sat, 5 May 2012 23:08:21 +0200 Subject: [PATCH] Fixed GitBranch::GetCommit() --- public_html/libgit/class.branch.php | 2 +- public_html/test.php | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/public_html/libgit/class.branch.php b/public_html/libgit/class.branch.php index d3f7355..ff93ad2 100644 --- a/public_html/libgit/class.branch.php +++ b/public_html/libgit/class.branch.php @@ -17,6 +17,6 @@ class GitBranch function GetTree() { - return $this->GetCommit()->GetTree(); + return $this->GetLastCommit()->GetTree(); } } diff --git a/public_html/test.php b/public_html/test.php index c405642..479fb25 100644 --- a/public_html/test.php +++ b/public_html/test.php @@ -2,11 +2,4 @@ require("libgit/base.php"); $repo = new GitRepository("/home/occupy/testrepo.git"); -pretty_dump($repo->GetTag("1.0")->GetTree()); - -/*pretty_dump($s->GetObject("54e03e490b1bee1c154c3545bf258cab0629ee02")); -pretty_dump($s->GetObject("98d99489382a3541e6783bb2083554785f3eb72a")); -pretty_dump($s->GetObject("9d8e0ba4a30f6a5d775a879c42c7de5aed4530c6")); -pretty_dump($s->GetObject("710bfee4440517255475bf7c5454c0bdbb3b3e56")); -pretty_dump($s->GetObject("ab2d7159831970ca08f2c9fc5c0fa34b17d572e9")); -pretty_dump($s->GetObject("cdebafd9e7426d0243cfb0a4ea2116a8b97b01e7"));*/ +pretty_dump($repo->GetBranch("master")->GetTree());