PHP 클래스 Gitamin\Services\Git\Repository

상속: extends Gitter\Repository
파일 보기 프로젝트 열기: gitaminhq/gitamin 1 사용 예제들

공개 메소드들

메소드 설명
createArchive ( string $tree, string $output, string $format = 'zip' ) Create a TAR or ZIP archive of a git tree.
getAuthorStatistics ( $branch )
getBlame ( string $file ) : array Blames the provided file and parses the output.
getCommit ( string $commitHash ) : array Show the data from a specific commit.
getHead ( $default = null ) Get the current branch, returning a default value when HEAD is detached.
getLatestCommit ( $file = null )
getPaginatedCommits ( string $file = null, $page ) : array Show the repository commit log with pagination.
getStatistics ( $branch )
hasCommit ( $commitHash ) : boolean Return true if the repo contains this commit.
pathExists ( string $commitish, string $path ) : boolean Return true if $path exists in $branch; return false otherwise.
readDiffLogs ( array $logs ) : array Read diff logs and generate a collection of diffs.
searchCommitLog ( $query, $branch )
searchTree ( $query, $branch )

메소드 상세

createArchive() 공개 메소드

Create a TAR or ZIP archive of a git tree.
public createArchive ( string $tree, string $output, string $format = 'zip' )
$tree string Tree-ish reference
$output string Output File name
$format string Archive format

getAuthorStatistics() 공개 메소드

public getAuthorStatistics ( $branch )

getBlame() 공개 메소드

Blames the provided file and parses the output.
public getBlame ( string $file ) : array
$file string File that will be blamed
리턴 array Commits hashes containing the lines

getCommit() 공개 메소드

Show the data from a specific commit.
public getCommit ( string $commitHash ) : array
$commitHash string Hash of the specific commit to read data
리턴 array Commit data

getHead() 공개 메소드

Get the current branch, returning a default value when HEAD is detached.
public getHead ( $default = null )

getLatestCommit() 공개 메소드

public getLatestCommit ( $file = null )

getPaginatedCommits() 공개 메소드

Show the repository commit log with pagination.
public getPaginatedCommits ( string $file = null, $page ) : array
$file string
리턴 array Commit log

getStatistics() 공개 메소드

public getStatistics ( $branch )

hasCommit() 공개 메소드

Return true if the repo contains this commit.
public hasCommit ( $commitHash ) : boolean
$commitHash Hash of commit whose existence we want to check
리턴 boolean Whether or not the commit exists in this repo

pathExists() 공개 메소드

Return true if $path exists in $branch; return false otherwise.
public pathExists ( string $commitish, string $path ) : boolean
$commitish string Commitish reference; branch, tag, SHA1, etc.
$path string Path whose existence we want to verify.
리턴 boolean GRIPE Arguably belongs in Gitter, as it's generally useful functionality. Also, this really may not be the best way to do this.

readDiffLogs() 공개 메소드

Read diff logs and generate a collection of diffs.
public readDiffLogs ( array $logs ) : array
$logs array Array of log rows
리턴 array Array of diffs

searchCommitLog() 공개 메소드

public searchCommitLog ( $query, $branch )

searchTree() 공개 메소드

public searchTree ( $query, $branch )