git

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package git provides git operations for the git-cc application with proper error handling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Commit

func Commit(message string) error

func GetStagedFiles

func GetStagedFiles() ([]string, error)

func IsGitRepository

func IsGitRepository() bool

IsGitRepository is an alias for IsInGitRepo to match the main.go interface

func IsInGitRepo

func IsInGitRepo() bool

Types

type CommitError

type CommitError struct {
	Type    ErrorType
	Message string
	Output  string
	Err     error
}

func (*CommitError) Error

func (e *CommitError) Error() string

func (*CommitError) GetDetails

func (e *CommitError) GetDetails() string

func (*CommitError) IsHook

func (e *CommitError) IsHook() bool

type CommitResult

type CommitResult struct {
	Success bool
	Message string
	Details string
}

func CommitWithResult

func CommitWithResult(message string) *CommitResult

type ErrorType

type ErrorType int
const (
	ErrorTypeUnknown ErrorType = iota
	ErrorTypeHookFailed
	ErrorTypeNoChanges
	ErrorTypeMergeConflict
	ErrorTypeNotInRepo
)

Jump to

Keyboard shortcuts

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