Skip to main content

Class: GitRef

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

Extends

  • BaseClient

Constructors

new GitRef()

new GitRef(parent?, _id?, _commit?): GitRef

Constructor is used for internal usage only, do not create object from it.

Parameters

parent?

parent.ctx?: Context

parent.queryTree?: QueryTree[]

_id?: GitRefID

_commit?: string

Returns

GitRef

Overrides

BaseClient.constructor

Methods

commit()

commit(): Promise<string>

The resolved commit id at this ref.

Returns

Promise<string>


id()

id(): Promise<GitRefID>

A unique identifier for this GitRef.

Returns

Promise<GitRefID>


tree()

tree(opts?): Directory

The filesystem tree at this ref.

Parameters

opts?: GitRefTreeOpts

Returns

Directory