git

package
v2.18.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package git contains functions for interacting with git.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IgnoredStatus

type IgnoredStatus struct {
	Path string
}

An IgnoredStatus is a status of an ignored file.

type OrdinaryStatus

type OrdinaryStatus struct {
	X    byte
	Y    byte
	Sub  string
	MH   int64
	MI   int64
	MW   int64
	HH   string
	HI   string
	Path string
}

An OrdinaryStatus is a status of a modified file.

type ParseError

type ParseError string

A ParseError is a parse error.

func (ParseError) Error

func (e ParseError) Error() string

type RenamedOrCopiedStatus

type RenamedOrCopiedStatus struct {
	X        byte
	Y        byte
	Sub      string
	MH       int64
	MI       int64
	MW       int64
	HH       string
	HI       string
	RC       byte
	Score    int64
	Path     string
	OrigPath string
}

A RenamedOrCopiedStatus is a status of a renamed or copied file.

type Status

type Status struct {
	Ordinary        []OrdinaryStatus
	RenamedOrCopied []RenamedOrCopiedStatus
	Unmerged        []UnmergedStatus
	Untracked       []UntrackedStatus
	Ignored         []IgnoredStatus
}

A Status is a status.

func ParseStatusPorcelainV2

func ParseStatusPorcelainV2(output []byte) (*Status, error)

ParseStatusPorcelainV2 parses the output of

git status --ignored --porcelain=v2

See https://git-scm.com/docs/git-status.

func (*Status) Empty

func (s *Status) Empty() bool

Empty returns true if s is empty.

type UnmergedStatus

type UnmergedStatus struct {
	X    byte
	Y    byte
	Sub  string
	M1   int64
	M2   int64
	M3   int64
	MW   int64
	H1   string
	H2   string
	H3   string
	Path string
}

An UnmergedStatus is the status of an unmerged file.

type UntrackedStatus

type UntrackedStatus struct {
	Path string
}

An UntrackedStatus is a status of an untracked file.

Jump to

Keyboard shortcuts

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