From: Chuck Hagenbuch Date: Tue, 9 Nov 2010 04:39:45 +0000 (-0500) Subject: Fix a few places that still need the full log list. Our goal should be to call this... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=04938342914328494a44d2fd4057b9cfa5c0743a;p=horde.git Fix a few places that still need the full log list. Our goal should be to call this as little as possible; it's really expensive. --- diff --git a/framework/Vcs/lib/Horde/Vcs/File/Git.php b/framework/Vcs/lib/Horde/Vcs/File/Git.php index de17a75ac..72cd84ae8 100644 --- a/framework/Vcs/lib/Horde/Vcs/File/Git.php +++ b/framework/Vcs/lib/Horde/Vcs/File/Git.php @@ -129,6 +129,7 @@ class Horde_Vcs_File_Git extends Horde_Vcs_File */ public function getHashForRevision($rev) { + $this->_ensureLogsInitialized(); if (!isset($this->logs[$rev])) { throw new Horde_Vcs_Exception('This file doesn\'t exist at that revision'); } @@ -227,6 +228,8 @@ class Horde_Vcs_File_Git extends Horde_Vcs_File return parent::queryLastLog(); } + $this->_ensureLogsInitialized(); + $rev = reset($this->_revlist[$this->_branch]); if (!is_null($rev)) { if (isset($this->logs[$rev])) {