class GitRef extends AbstractObject implements IdAble, Node

A git ref (tag, branch, or commit).

Properties

$lastQuery from  AbstractObject

Methods

__construct(AbstractClient $client, QueryBuilderChain $queryBuilderChain)

No description

null|array|string|int|float|bool
queryLeaf(QueryBuilder $leafQueryBuilder, string $leafKey)

No description

asWorkspace(string|null $cwd = '/')

Creates a synthetic workspace from this git ref.

string
commit()

The resolved commit id at this ref.

string
commitSHA()

The resolved commit SHA at this ref.

commonAncestor(GitRef $other)

Find the best common ancestor between this ref and another ref.

Id
id()

A unique identifier for this GitRef.

array
log(int|null $limit = 10, array|null $paths = null, GitRef|null $base = null)

Commits reachable from this ref, newest first, starting with the commit this ref resolves to.

string
name()

The resolved name of this ref.

string
ref()

The resolved ref name at this ref.

targetCommit()

The commit this ref resolves to.

tree(bool|null $discardGitDir = false, int|null $depth = 1, bool|null $includeTags = false)

The filesystem tree at this ref.

Details

in AbstractObject at line 13
__construct(AbstractClient $client, QueryBuilderChain $queryBuilderChain)

No description

Parameters

AbstractClient $client
QueryBuilderChain $queryBuilderChain

in AbstractObject at line 19
protected null|array|string|int|float|bool queryLeaf(QueryBuilder $leafQueryBuilder, string $leafKey)

No description

Parameters

QueryBuilder $leafQueryBuilder
string $leafKey

Return Value

null|array|string|int|float|bool

at line 19
Workspace asWorkspace(string|null $cwd = '/')

Creates a synthetic workspace from this git ref.

Parameters

string|null $cwd

Return Value

Workspace

at line 31
string commit()

The resolved commit id at this ref.

Return Value

string

at line 40
string commitSHA()

The resolved commit SHA at this ref.

Return Value

string

at line 49
GitRef commonAncestor(GitRef $other)

Find the best common ancestor between this ref and another ref.

Parameters

GitRef $other

Return Value

GitRef

at line 59
Id id()

A unique identifier for this GitRef.

Return Value

Id

at line 68
array log(int|null $limit = 10, array|null $paths = null, GitRef|null $base = null)

Commits reachable from this ref, newest first, starting with the commit this ref resolves to.

Parameters

int|null $limit
array|null $paths
GitRef|null $base

Return Value

array

at line 86
string name()

The resolved name of this ref.

Return Value

string

at line 95
string ref()

The resolved ref name at this ref.

Return Value

string

at line 104
GitCommit targetCommit()

The commit this ref resolves to.

Return Value

GitCommit

at line 113
Directory tree(bool|null $discardGitDir = false, int|null $depth = 1, bool|null $includeTags = false)

The filesystem tree at this ref.

Parameters

bool|null $discardGitDir
int|null $depth
bool|null $includeTags

Return Value

Directory