Documentation for Simbo's Packages
    Preparing search index...
    • Checks if the given directory is the root of a Git working tree.

      Asks Git for the top-level directory of the working tree with git rev-parse --show-toplevel and compares it with the given directory after resolving symbolic links in both paths. The roots of linked worktrees and submodules count as roots; bare repositories, the .git directory and directories outside a repository do not.

      Parameters

      • workingDir: string = ...

        The directory to check. Defaults to the current working directory.

      Returns Promise<boolean>

      A promise that resolves to true if the directory is the root of a Git working tree, false otherwise, also if it does not exist or is not a directory.

      if Git cannot be started or is terminated.