class Git (View source)

internal  
 

Provide some Git utility operations

Methods

static bool
checkIgnore(IOInterface $io, string $path, string $dir = NULL)

Determines whether the specified scaffold file is already ignored.

static bool
checkTracked(IOInterface $io, string $path, string $dir = NULL)

Determines whether the specified scaffold file is tracked by git.

static bool
isRepository(IOInterface $io, string $dir = NULL)

Checks to see if the project root dir is in a git repository.

Details

static bool checkIgnore(IOInterface $io, string $path, string $dir = NULL)

Determines whether the specified scaffold file is already ignored.

Parameters

IOInterface $io
string $path

Path to scaffold file to check.

string $dir

Base directory for git process.

Return Value

bool

Whether the specified file is already ignored or not (TRUE if ignored).

static bool checkTracked(IOInterface $io, string $path, string $dir = NULL)

Determines whether the specified scaffold file is tracked by git.

Parameters

IOInterface $io
string $path

Path to scaffold file to check.

string $dir

Base directory for git process.

Return Value

bool

Whether the specified file is already tracked or not (TRUE if tracked).

static bool isRepository(IOInterface $io, string $dir = NULL)

Checks to see if the project root dir is in a git repository.

Parameters

IOInterface $io
string $dir

Base directory for git process.

Return Value

bool

True if this is a repository.