statuses

package module
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: MIT Imports: 10 Imported by: 0

README

git-statuses

git-statuses finds local git repositories and show statuses of them.

PkgGoDev Go Report Card Coverage Status Release

Install

go get github.com/kyoh86/git-statuses

Usage

git statuses [--json] (pathspec)

or

cd (pathspec); git statuses [--json]

Result

Sample
$ git statuses
-1 +2  U github.com/kyoh86/git-statuses
-1     U github.com/kyoh86/go-jsonrider
   +3 M  github.com/kyoh86/go-pcre
      M  github.com/kyoh86/gogh
      MU github.com/kyoh86/mogelo
Format
(status) (repository path)
(status) (repository path)
:        :
status description
+n Contains ahead commits
-n Contains behind commits
M Contains deleted/modified files
U Contains untracked files

LICENSE

MIT License

This is distributed under the MIT License.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSONFormat

func JSONFormat(status Status) (string, error)

func ShortFormat

func ShortFormat(status Status) (string, error)

Types

type Formatter

type Formatter func(Status) (string, error)

type Status

type Status struct {
	Path      string `json:"path"`
	Untracked bool   `json:"untracked"`
	Modified  bool   `json:"modified"`
	Branch    string `json:"branch"`
	Upstream  string `json:"upstream"`
	Ahead     int    `json:"ahead"`
	Behind    int    `json:"behind"`
	URL       string `json:"url"`
}

func GetStatus

func GetStatus(ctx context.Context, path string) (Status, error)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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