exec

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommitExists

func CommitExists(ctx context.Context, commitHash string) bool

CommitExists checks if a commit hash is valid.

func SquashCommits

func SquashCommits(ctx context.Context, commitHash, message string) error

SquashCommits performs a soft reset and creates a new squashed commit.

Types

type GitCommit

type GitCommit struct {
	Hash      string
	HashShort string
	Comment   string
	Author    string
	Time      string
}

func GetSquashableCommits

func GetSquashableCommits(ctx context.Context) ([]GitCommit, error)

GetSquashableCommits returns commits that haven't been pushed. If no remote is found, it falls back to listing recent commits from the log.

func GitLog

func GitLog(ctx context.Context) ([]GitCommit, error)

GitLog executes `git log` and returns the last 20 commits.

func (*GitCommit) String

func (c *GitCommit) String() string

Jump to

Keyboard shortcuts

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