PHP Class Neos\Flow\Core\Migrations\Git

Datei anzeigen Open project: neos/flow-development-collection Class Usage Examples

Public Methods

Method Description
commitAll ( string $path, string $message ) : array
getLog ( string $path, string $searchTerm = null ) : array Returns the git log for the specified $path, optionally filtered for $searchTerm
isGitAvailable ( ) : boolean Check whether the git command is available.
isWorkingCopy ( string $path ) : boolean Check whether the given $path is inside a git repository
isWorkingCopyDirty ( string $path ) : boolean Check whether the working copy has uncommitted changes.
isWorkingCopyRoot ( string $path ) : boolean Check whether the given $path points to the top-level of a git repository
logContains ( string $path, string $searchTerm ) : boolean Checks if the git repository for the given $path has a log entry matching $searchTerm
move ( string $source, string $target ) : integer
remove ( $fileOrDirectory ) : integer
show ( ) : string Get the result of git show for the current directory.

Method Details

commitAll() public static method

public static commitAll ( string $path, string $message ) : array
$path string
$message string
return array in the format [, '']

getLog() public static method

Returns the git log for the specified $path, optionally filtered for $searchTerm
public static getLog ( string $path, string $searchTerm = null ) : array
$path string
$searchTerm string optional term to filter the log for
return array

isGitAvailable() public static method

Check whether the git command is available.
public static isGitAvailable ( ) : boolean
return boolean

isWorkingCopy() public static method

Check whether the given $path is inside a git repository
public static isWorkingCopy ( string $path ) : boolean
$path string
return boolean

isWorkingCopyDirty() public static method

Check whether the working copy has uncommitted changes.
public static isWorkingCopyDirty ( string $path ) : boolean
$path string
return boolean

isWorkingCopyRoot() public static method

Check whether the given $path points to the top-level of a git repository
public static isWorkingCopyRoot ( string $path ) : boolean
$path string
return boolean

logContains() public static method

Checks if the git repository for the given $path has a log entry matching $searchTerm
public static logContains ( string $path, string $searchTerm ) : boolean
$path string
$searchTerm string
return boolean

move() public static method

public static move ( string $source, string $target ) : integer
$source string
$target string
return integer

remove() public static method

public static remove ( $fileOrDirectory ) : integer
$fileOrDirectory
return integer

show() public static method

Get the result of git show for the current directory.
public static show ( ) : string
return string