Represents the real location of the Git data directory.

  • In standalone repos this is .git/
  • If the contracts workspace repository is a submodule, .git will be a file containing e.g. "gitdir: ../.git/modules/something"

Hierarchy (view full)

Constructors

  • Parameters

    • base: string | URL
    • Rest ...fragments: string[]

    Returns DotGit

Properties

absolute: string

The resolved absolute filesystem path represented by this object.

isSubmodule: boolean

Whether the workspace's repository is a submodule and its .git is a pointer to the parent's .git/modules

present: boolean

Whether a .git is present

rootRepoRE: RegExp
separator: "\\" | "/" = sep

Accessors

  • get [toStringTag](): string
  • Returns string

  • get dirname(): string
  • Returns string

    absolute path to parent directory.

  • get name(): string
  • Returns string

    name of this file or directory.

  • get rootRepo(): Path
  • Returns Path

  • get short(): string
  • Returns string

  • get submoduleDir(): string
  • Returns string

  • get url(): URL
  • Returns URL

    this.absolute represented as a file:/// URL

Methods

  • Parameters

    • Optional ext: string

    Returns string

    name of this file or directory.

  • Type Parameters

    • T

    Parameters

    • command: ((argv) => T)
        • (argv): T
        • Parameters

          • argv: string[]

          Returns T

    Returns T

  • Returns this

  • Parameters

    • base: string = ...

    Returns string

  • Parameters

    • target: string = ...

    Returns string

  • Parameters

    • Rest ...fragments: string[]

    Returns string

Generated using TypeDoc