Help us shape the future of Go! Take the 2026 Go Developer Survey

git

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertFromGitCommit

func ConvertFromGitCommit(ctx context.Context, commits []*git.Commit, repo *repo_model.Repository) ([]*git_model.SignCommitWithStatuses, error)

ConvertFromGitCommit converts git commits into SignCommitWithStatuses

func ParseCommitsWithSignature

func ParseCommitsWithSignature(ctx context.Context, repo *repo_model.Repository, oldCommits []*user_model.UserCommit, repoTrustModel repo_model.TrustModelType) ([]*asymkey_model.SignCommit, error)

ParseCommitsWithSignature checks if signaute of commits are corresponding to users gpg keys.

func ParseCommitsWithStatus

func ParseCommitsWithStatus(ctx context.Context, oldCommits []*asymkey_model.SignCommit, repo *repo_model.Repository) ([]*git_model.SignCommitWithStatuses, error)

ParseCommitsWithStatus checks commits latest statuses and calculates its worst status state

Types

type CompareInfo

type CompareInfo struct {
	BaseRepo         *repo_model.Repository
	BaseRef          git.RefName
	BaseCommitID     string
	HeadRepo         *repo_model.Repository
	HeadGitRepo      *git.Repository
	HeadRef          git.RefName
	HeadCommitID     string
	CompareSeparator string
	MergeBase        string
	Commits          []*git.Commit
	NumFiles         int
}

CompareInfo represents needed information for comparing references.

func GetCompareInfo

func GetCompareInfo(ctx context.Context, baseRepo, headRepo *repo_model.Repository, headGitRepo *git.Repository, baseRef, headRef git.RefName, directComparison, fileOnly bool) (_ *CompareInfo, err error)

GetCompareInfo generates and returns compare information between base and head branches of repositories.

func (*CompareInfo) DirectComparison

func (ci *CompareInfo) DirectComparison() bool

func (*CompareInfo) IsSameRef

func (ci *CompareInfo) IsSameRef() bool

func (*CompareInfo) IsSameRepository

func (ci *CompareInfo) IsSameRepository() bool

Jump to

Keyboard shortcuts

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