backend/components/AGitTag.php
/**
	 * Loads the metadata for the tag
	 */
Loads the metadata for the tag
Loads the metadata for the tag
protected function loadData()
	{
		$delimiter = '|||||-----|||||-----|||||';
 		$command = 'show --pretty=format:"'.$delimiter.'%H'.$delimiter.'" '.$this->name;
 		$response = explode($delimiter,$this->repository->run($command));
 		$tagData = $response[0];
 		$commitHash = $response[1];
		if (strpos($tagData, "tag $this->name") === 0) { 
 			if(preg_match("/Tagger: (.*)\n/", $tagData, $matches)){
 				$tagger = $matches[1];
				if (preg_match("/(.*) <(.*)>/u", $tagger,$matches)) {
					$this->_authorEmail = trim(array_pop($matches));
					$this->_authorName = trim(array_pop($matches));
				}
				else {
					$this->_authorName = $tagger;
				}
				$this->_message = trim(preg_replace("/.*\nTagger: .*\n/", '', $tagData));
 			}
 		}
 		$this->_commit = new AGitCommit($commitHash, $this->repository);
	}
protected function loadData ( ) { $ delimiter = '|||||-----|||||-----|||||' ; $ command = 'show --pretty=format:"' . $ delimiter . '%H' . $ delimiter . '" ' . $ this -> name ; $ response = explode ( $ delimiter , $ this -> repository -> run ( $ command ) ) ; $ tagData = $ response [ 0 ] ; $ commitHash = $ response [ 1 ] ; if ( strpos ( $ tagData , " tag  $ this -> name " ) === 0 ) { if ( preg_match ( " /Tagger: (.*) \n / " , $ tagData , $ matches ) ) { $ tagger = $ matches [ 1 ] ; if ( preg_match ( " /(.*) <(.*)>/u " , $ tagger , $ matches ) ) { $ this -> _authorEmail = trim ( array_pop ( $ matches ) ) ; $ this -> _authorName = trim ( array_pop ( $ matches ) ) ; } else { $ this -> _authorName = $ tagger ; } $ this -> _message = trim ( preg_replace ( " /.* \n Tagger: .* \n / " , '' , $ tagData ) ) ; } } $ this -> _commit = new AGitCommit ( $ commitHash , $ this -> repository ) ; }
Loads the metadata for the tag
Loads the metadata for the tag
//annotated tag