Interface RevParseOptions

RevParseOptions defines the supported options for the Git rev-parse command.

Hierarchy

  • RevParseOptions

Properties

--abbrev-ref?: null | string

A non-ambiguous short name of the objects name.

--absolute-git-dir?: null

Like --git-dir, but its output is always the canonicalized absolute path.

--all?: null

Includes all the refs in refs/, along with HEAD.

--branches?: null | string

Includes all the refs in refs/heads.

--default?: string

If there is no parameter given by the user, uses arg instead.

--disambiguate?: string

Shows every object whose name begins with the given prefix.

--exclude?: string | string[]

Excludes all the refs matching the specified pattern.

--flags?: null

Does not output non flag parameters.

--git-common-dir?: null

Shows $GIT_COMMON_DIR, if defined; else, $GIT_DIR.

--git-dir?: null

Shows $GIT_DIR, if defined.

--git-path?: string

Resolves "$GIT_DIR/path".

--glob?: string

Includes all the refs matching the specified pattern.

--is-bare-repository?: null

Determines if the the repository is bare.

--is-inside-git-dir?: null

Determines if the current working directory is below the repository directory.

--is-inside-work-tree?: null

Determines if the current working directory is inside the repository work tree.

--is-shallow-repository?: null

Determines if the the repository is shallow.

--local-env-vars?: null

List the GIT_* environment variable names that are local to the repository.

--no-flags?: null

Does not output flag parameters.

--no-revs?: null

Does not output flags and parameters meant for Git rev-list command.

--not?: null

When showing object names, prefix them with ^ and strip ^ prefix from the object names that already have one.

--path-format?: string

Selects the path format of certain other options.

--prefix?: string

Behaves as if Git rev-parse was invoked from the arg subdirectory of the working tree.

--quiet?: null

Does not output an error message if the first argument is not a valid object name.

--remotes?: null | string

Includes all the refs in refs/remotes.

--resolve-git-dir?: string

Checks if path is a valid repository or a gitfile that points at a valid repository, and print the location of the repository.

--revs-only?: null

Does not output flags and parameters not meant for Git rev-list command.

--shared-index-path?: null

Shows the path to the shared index file in split index mode.

--short?: null | string | number

Same as --verify but shortens the object name to a unique prefix with at least length characters.

--show-cdup?: null

Shows the path of the top-level directory relative to the current directory.

--show-object-format?: null | string

Shows the object format (hash algorithm) used.

--show-prefix?: null

Shows the path of the current directory relative to the top-level directory.

--show-superproject-working-tree?: null

Shows the absolute path of the root of the superproject’s working tree.

--show-toplevel?: null

Shows the path of the top-level directory of the working tree.

--symbolic?: null

Usually the object names are output in SHA-1 form (with possible ^ prefix); this option makes them output in a form as close to the original input as possible.

--symbolic-full-name?: null

Similar to --symbolic, but it omits input that are not refs.

--tags?: null | string

Includes all the refs in refs/tags.

--verify?: null

Verifies exactly one parameter is provided, and that it can be turned into a raw 20-byte SHA-1 that can be used to access the object database.