gitmerge

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCommits

func GetCommits(
	repo *gogit.Repository,
	branchName string,
	remoteName string,
) (local, remote *object.Commit, err error)

GetCommits returns the local and remote HEAD commits for the main branch.

func MergeRemoteIntoBranch

func MergeRemoteIntoBranch(repo *gogit.Repository, opts Options) error

MergeRemoteIntoBranch performs a 3-way last-write-wins merge of origin/main -> main.

Types

type IncludePathFunc

type IncludePathFunc func(gitPath string) bool

type Options

type Options struct {
	BranchName string
	RemoteName string

	AuthorName  string
	AuthorEmail string

	IncludePath IncludePathFunc
	UpdatedAt   UpdatedAtFunc

	Now func() time.Time
}

type UpdatedAtFunc

type UpdatedAtFunc func(gitPath string, data []byte) (time.Time, error)

Jump to

Keyboard shortcuts

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