gatelineAPI reference

Constructors

Properties

dir: string

Methods

  • Parameters

    • tree: string
    • parent: string
    • message: string
    • Optionalidentity: { email: string; name: string }

    Returns Promise<string>

  • The repo's default branch: origin/HEAD when set, else main/master (local, then remote-tracking — CI checkouts detach HEAD with no local branches), else the current HEAD's branch.

    Returns Promise<string>

  • Parameters

    • base: string
    • head: string
    • pathspec: string[] = []

    Returns Promise<string>

  • Most recent commit on rev touching anything under dir except excludePaths, or null.

    Parameters

    • rev: string
    • dir: string
    • excludePaths: string[]

    Returns Promise<null | CommitInfo>

  • Parameters

    • rev: string
    • paths: string[] = []
    • opts: { maxCount?: number; topoOrder?: boolean } = {}

    Returns Promise<CommitInfo[]>

  • Paths (relative to path) of blobs under rev:path. Empty when missing.

    Parameters

    • rev: string
    • path: string

    Returns Promise<string[]>

  • Top-level directory names under rev:path.

    Parameters

    • rev: string
    • path: string

    Returns Promise<string[]>

  • Object id of rev:path — a tree for a directory, a blob for a file — or null when that path does not exist at that rev. Content identity without reading the content: two revs naming the same tree carry byte-identical directories.

    Parameters

    • rev: string
    • path: string

    Returns Promise<null | string>

  • git rev-list --count <range>, or null when a ref in the range is unknown.

    Parameters

    • range: string

    Returns Promise<null | number>

  • Parameters

    • args: string[]
    • opts: { env?: Record<string, string>; input?: string } = {}

    Returns Promise<string>

  • Content of path at rev, or null when the path/rev doesn't exist.

    Parameters

    • rev: string
    • path: string

    Returns Promise<null | string>

  • Atomic compare-and-swap ref update. Returns false when the ref no longer points at expectedOld — the caller re-reads and re-presents.

    Parameters

    • ref: string
    • newOid: string
    • expectedOld: string

    Returns Promise<boolean>

  • Build a tree that is baseCommit's tree with one blob replaced, without touching any index or working tree the user owns.

    Parameters

    • baseCommit: string
    • path: string
    • blobOid: string

    Returns Promise<string>