git

package
v0.0.0-...-82180e8 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EmptyTreeCommitID = "4b825dc642cb6eb9a060e54bf8d69288fbee4904"
)

EmptyTreeCommit is a dummy commit id used as a placeholder and for testing

Variables

This section is empty.

Functions

func GetChangeAction

func GetChangeAction(change *object.Change) string

GetChangeAction returns a more condensed and user friendly action for further reference

func GetChangeContent

func GetChangeContent(change *object.Change) (result string, contentError error)

GetChangeContent will get the contents of a git change or patch.

func GetChangePath

func GetChangePath(change *object.Change) string

GetChangePath will set the action of the commit for further action

func GetChanges

func GetChanges(commit *object.Commit, repo *git.Repository) (object.Changes, error)

GetChanges will get the changes between to specific commits. It grabs the parent commit of the one being passed and uses that to fetch the tree for that commit. If no commit is found, it will create a fake on. It then takes that parent tree along with the tree for the commit passed in and does a diff

func GetRepositoryHistory

func GetRepositoryHistory(repository *git.Repository) ([]*object.Commit, error)

GetRepositoryHistory gets the commit history of a repository

Types

This section is empty.

Jump to

Keyboard shortcuts

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