internal

package
v0.0.0-...-3b3e90e Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: MIT

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Amend

func Amend(date time.Time, lastDate *time.Time, lastRealDate *time.Time, threshold int, schedule config.Schedule) time.Time

Types

type CommandError

type CommandError struct {
	Command string
	Stdout  string
	Stderr  string
	// contains filtered or unexported fields
}

func (*CommandError) PrettyPrint

func (e *CommandError) PrettyPrint()

type Commit

type Commit struct {
	Hash    string
	Message string
	Date    time.Time
	Author  string
	Files   []string
	Prev    *Commit
	Next    *Commit
}

type GitLog

type GitLog []*Commit

type GitRepo

type GitRepo struct {
	Dir string
	// contains filtered or unexported fields
}

func NewGitRepo

func NewGitRepo(dir string, verbose bool) (*GitRepo, error)

func NewGitRepoWithoutGlobalConfig

func NewGitRepoWithoutGlobalConfig(dir string, verbose bool) (*GitRepo, error)

func (*GitRepo) AmendDate

func (r *GitRepo) AmendDate(commit *Commit) error

func (*GitRepo) AmendDates

func (r *GitRepo) AmendDates(log GitLog) error

func (*GitRepo) BranchUpstream

func (r *GitRepo) BranchUpstream(branch string) string

func (*GitRepo) Clone

func (r *GitRepo) Clone(remote string) error

func (*GitRepo) Commit

func (r *GitRepo) Commit(commit *Commit) error

func (*GitRepo) CurrentBranch

func (r *GitRepo) CurrentBranch() string

func (*GitRepo) GetConfig

func (r *GitRepo) GetConfig(option string) (string, error)

func (*GitRepo) GetHook

func (r *GitRepo) GetHook(name string) (string, error)

func (*GitRepo) GetSectionOptions

func (r *GitRepo) GetSectionOptions(name string) (map[string]string, error)

func (*GitRepo) GetVar

func (r *GitRepo) GetVar(str string) (string, error)

func (*GitRepo) Init

func (r *GitRepo) Init(rT RepoType) error

func (*GitRepo) IsGitRepo

func (r *GitRepo) IsGitRepo() bool

func (*GitRepo) Log

func (r *GitRepo) Log() (GitLog, error)

func (*GitRepo) LogWithRevision

func (r *GitRepo) LogWithRevision(revisionRange string) (GitLog, error)

func (*GitRepo) Origin

func (r *GitRepo) Origin() (string, error)

func (*GitRepo) Push

func (r *GitRepo) Push() error

func (*GitRepo) RootCommitHash

func (r *GitRepo) RootCommitHash() (string, error)

func (*GitRepo) SetConfig

func (r *GitRepo) SetConfig(key string, value string) error

func (*GitRepo) SetOrigin

func (r *GitRepo) SetOrigin(url string) error

func (*GitRepo) State

func (r *GitRepo) State() RepoState

func (*GitRepo) Type

func (r *GitRepo) Type() (RepoType, error)

type RepoState

type RepoState int
const (
	Clean RepoState = iota
	Merge
	Rebase
	CherryPick
	Bisect
)

func (RepoState) String

func (s RepoState) String() string

type RepoType

type RepoType int
const (
	Working RepoType = iota
	Bare
)

Jump to

Keyboard shortcuts

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