git

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseConventionalCommit

func ParseConventionalCommit(message string) (ccType, scope, subject string)

ParseConventionalCommit extracts type, scope, and subject from a commit message. If the message doesn't match Conventional Commits format, type and scope are empty and subject is the full message.

Types

type Adapter

type Adapter struct {
	// contains filtered or unexported fields
}

Adapter implements domain.GitAdapter via exec.Command("git", ...).

func New

func New(workDir string) *Adapter

New creates an Adapter for the given working directory (M4: canonical constructor name).

func NewAdapter

func NewAdapter(workDir string) *Adapter

NewAdapter is an alias for New, kept for compatibility with existing callers.

func (*Adapter) CommitExists

func (a *Adapter) CommitExists(ref string) (bool, error)

func (*Adapter) CommitMessageContains

func (a *Adapter) CommitMessageContains(ref, marker string) (bool, error)

func (*Adapter) Diff

func (a *Adapter) Diff(ref string) (string, error)

func (*Adapter) GitDir

func (a *Adapter) GitDir() (string, error)

func (*Adapter) HeadRef

func (a *Adapter) HeadRef() (string, error)

func (*Adapter) HookExists

func (a *Adapter) HookExists(hookType string) (bool, error)

func (*Adapter) InstallHook

func (a *Adapter) InstallHook(hookType string) (domain.InstallResult, error)

func (*Adapter) IsInsideWorkTree

func (a *Adapter) IsInsideWorkTree() bool

func (*Adapter) IsMergeCommit

func (a *Adapter) IsMergeCommit(ref string) (bool, error)

func (*Adapter) IsRebaseInProgress

func (a *Adapter) IsRebaseInProgress() (bool, error)

func (*Adapter) Log

func (a *Adapter) Log(ref string) (*domain.CommitInfo, error)

func (*Adapter) UninstallHook

func (a *Adapter) UninstallHook(hookType string) error

Jump to

Keyboard shortcuts

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