gitparse

package
v3.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: AGPL-3.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const DateFormat = "Mon Jan 02 15:04:05 2006 -0700"

DateFormat is the standard date format for git.

Variables

This section is empty.

Functions

func RepoPath

func RepoPath(source string, head string) (chan Commit, error)

RepoPath parses the output of the `git log` command for the `source` path.

Types

type Commit

type Commit struct {
	Hash    string
	Author  string
	Date    time.Time
	Message strings.Builder
	Diffs   []Diff
}

Commit contains commit header info and diffs.

type Diff

type Diff struct {
	PathB     string
	LineStart int
	Content   bytes.Buffer
	IsBinary  bool
}

Diff contains the info about a file diff in a commit.

Jump to

Keyboard shortcuts

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