gitinfo

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const UpstreamOwner = "suxess-it"

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	Root   string
	Origin Remote
	Branch string
}

func Detect

func Detect(dir string) (*Info, error)

Detect returns nil, nil when dir is not inside a kubriX checkout.

func (*Info) IsFork

func (i *Info) IsFork() bool

func (*Info) PushStatus

func (i *Info) PushStatus() (PushStatus, error)

type PushStatus

type PushStatus struct {
	RemoteMissing bool
	Diverged      bool
	Dirty         bool
}

func Classify

func Classify(localHead, remoteHead, porcelain string) PushStatus

Classify takes `git rev-parse HEAD`, the sha from `git ls-remote` (empty if the branch is not on the remote) and `git status --porcelain` output.

func (PushStatus) Warnings

func (s PushStatus) Warnings(branch string) []string

type Remote

type Remote struct {
	Owner string
	Repo  string
}

func ParseRemote

func ParseRemote(url string) (Remote, error)

func (Remote) Slug

func (r Remote) Slug() string

func (Remote) URL

func (r Remote) URL() string

Jump to

Keyboard shortcuts

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