Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace GitUtils

Contains a set of utility functions for Git.

Index

Variables

Const RepositoryDoesNotExistErrorCode

RepositoryDoesNotExistErrorCode: "repository-does-not-exist-error" = "repository-does-not-exist-error"

The error code for when the path to a repository doesn't exist.

Functions

isBranchCheckout

  • isBranchCheckout(arg: any | undefined): arg is CheckoutBranch
  • true if the argument is an option for checking out a new local branch.

    Parameters

    • arg: any | undefined

    Returns arg is CheckoutBranch

isBranchCreate

  • isBranchCreate(arg: any | undefined): arg is Create
  • true if the argument is an option for creating a new branch in the repository.

    Parameters

    • arg: any | undefined

    Returns arg is Create

isBranchDelete

  • isBranchDelete(arg: any | undefined): arg is Delete
  • true if the argument is an option for deleting an existing branch in the repository.

    Parameters

    • arg: any | undefined

    Returns arg is Delete

isBranchList

  • isBranchList(arg: any | undefined): arg is List
  • true if the argument is an option for listing the branches in a repository.

    Parameters

    • arg: any | undefined

    Returns arg is List

isBranchRename

  • isBranchRename(arg: any | undefined): arg is Rename
  • true if the argument is an option for renaming an existing branch in the repository.

    Parameters

    • arg: any | undefined

    Returns arg is Rename

isRepositoryDoesNotExistError

  • isRepositoryDoesNotExistError(error: any | undefined): boolean
  • true if the argument is an error indicating the absence of a local Git repository. Otherwise, false.

    Parameters

    • error: any | undefined

    Returns boolean

isSimilarityStatus

  • isSimilarityStatus(rawStatus: string): boolean
  • true if the argument is a raw Git status with similarity percentage. Otherwise, false.

    Parameters

    • rawStatus: string

    Returns boolean

isWorkingTreeFileCheckout

  • isWorkingTreeFileCheckout(arg: any | undefined): arg is WorkingTreeFile
  • true if the argument is an option for checking out a working tree file.

    Parameters

    • arg: any | undefined

    Returns arg is WorkingTreeFile

mapStatus