コード例 #1
0
ファイル: Ref.class.php プロジェクト: sandassha/gitstack
 /**
  * GetHash
  *
  * Gets the hash for this ref (overrides base)
  *
  * @access public
  * @param boolean $abbreviate true to abbreviate hash
  * @return string object hash
  */
 public function GetHash($abbreviate = false)
 {
     if (empty($this->hash)) {
         $this->FindHash();
     }
     return parent::GetHash($abbreviate);
 }
コード例 #2
0
ファイル: Commit.class.php プロジェクト: sandassha/gitstack
 /**
  * GetHash
  *
  * Gets the hash for this commit (overrides base)
  *
  * @access public
  * @param boolean $abbreviate true to abbreviate hash
  * @return string object hash
  */
 public function GetHash($abbreviate = false)
 {
     if ($this->GetProject()->GetCompat() && $abbreviate) {
         // abbreviated hash is loaded as part of commit data in compat mode
         if (!$this->dataRead) {
             $this->ReadData();
         }
     }
     return parent::GetHash($abbreviate);
 }
コード例 #3
0
ファイル: Commit.class.php プロジェクト: fboender/gitphp
 /**
  * Gets the hash for this commit (overrides base)
  *
  * @param boolean $abbreviate true to abbreviate hash
  * @return string object hash
  */
 public function GetHash($abbreviate = false)
 {
     if ($abbreviate && $this->strategy->LoadsAbbreviatedHash()) {
         if (!$this->dataRead) {
             $this->ReadData();
         }
     }
     return parent::GetHash($abbreviate);
 }
コード例 #4
0
ファイル: Router.class.php プロジェクト: fboender/gitphp
 /**
  * Gets a hash for a string or hash-identified object
  *
  * @param string|GitPHP_GitObject $value string or hashed object
  * @param boolean $abbreviate true to abbreviate hash
  * @return string hash
  */
 private static function GetHash($value, $abbreviate = false)
 {
     if ($value instanceof GitPHP_GitObject) {
         return $value->GetHash($abbreviate);
     } else {
         if (is_string($value)) {
             return $value;
         }
     }
     return null;
 }