vcsstatus

command module
v0.0.0-...-86592f6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2020 License: MIT Imports: 16 Imported by: 0

README

gitstatus

Return status of a git repository, suitable for prompt interpretation.

Version Control Systems

This application currently supports git and mercurial (hg) repositories. You can choose what repo you would like the status of:

--vcs=detect (default)

Figure out which repository among the ones supported applies to the directory.

Output Formats

--output=full (default)

The default output will be a JSON blob containing the following:

  • Identifying this path as part of a git repository
  • The git root
  • Changed Files
    • A set of characters indicating different changes, and a count of files affected.
    • 'M' -- modified
    • 'A' -- added
    • 'D' -- deleted
    • 'R' -- renamed
    • 'C' -- copied
    • 'U' -- updated
    • '?' -- untracked
    • '!' -- ignored
  • The current branch name
    • Plain text
    • Colored according to branch status
  • Non-active branches available locally
  • Current branch tracking information
--output=prompt

Two lines containing:

  • The branches, colored appropriately, as: git:<master>
  • The change counts, as: M:1 -:1 ?:1
--output=statusline

Lines containing:

  • VCS name
  • The repository name (pulled from root directory)
  • Branch tracking information, as: master...origin/master
  • Change counts, as: M:1 -:1 ?:1
  • Full path to the repository

Options

--dir=(path)

Directory to check for git repository. Defaults to the working directory.

--color

Forces color output. The default is color enalbed when writing to interactive ttys.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL