git

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(args []string) error

Types

type Blame

type Blame struct {
	XMLName    xml.Name `xml:"line"`
	LineNum    int      `xml:"line_num,attr"`
	Commit     string   `xml:"commit,attr"`
	Author     string   `xml:"author,attr"`
	AuthorDate int64    `xml:"author_date,attr"`
	DateAgo    int64    `xml:"author_date_ago_s,attr"`
	Content    string   `xml:"content,attr"`
}

type Commit

type Commit struct {
	XMLName    xml.Name `xml:"commit"`
	Hash       string   `xml:"hash,attr"`
	ShortHash  string   `xml:"short_hash,attr"`
	Author     string   `xml:"author,attr"`
	AuthorDate int64    `xml:"author_date,attr"`
	DateAgo    int64    `xml:"author_date_ago_s,attr"`
	Message    string   `xml:"message,attr"`
	Files      []string `xml:"files>file,omitempty"`
}

type Config

type Config struct {
	Subcommand string
	XML        bool
	JSON       bool
	Plain      bool
	Pretty     bool
}

type File

type File struct {
	XMLName xml.Name `xml:"file"`
	Path    string   `xml:"path,attr"`
	Mode    string   `xml:"mode,attr,omitempty"`
	Blob    string   `xml:"blob,attr,omitempty"`
}

type GitError

type GitError struct {
	XMLName xml.Name `xml:"error"`
	Code    int      `xml:"code,attr"`
	Msg     string   `xml:"msg,attr"`
	Path    string   `xml:"path,attr"`
}

type GitResult

type GitResult struct {
	XMLName   xml.Name   `xml:"git"`
	Timestamp int64      `xml:"timestamp,attr"`
	Subcmd    string     `xml:"subcommand,attr"`
	Status    []Status   `xml:"status>file,omitempty"`
	Files     []File     `xml:"files>file,omitempty"`
	Log       []Commit   `xml:"log>commit,omitempty"`
	Blame     []Blame    `xml:"blame>line,omitempty"`
	Errors    []GitError `xml:"error,omitempty"`
}

type Status

type Status struct {
	XMLName  xml.Name `xml:"file"`
	Path     string   `xml:"path,attr"`
	Status   string   `xml:"status,attr"`
	Original string   `xml:"original,attr,omitempty"`
}

Jump to

Keyboard shortcuts

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