git

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatChangesForPrompt

func FormatChangesForPrompt(changes *Changes) string

FormatChangesForPrompt converts the Changes structure to a formatted string for use in AI prompts

func GetDiff

func GetDiff() (string, error)

GetDiff gets the git diff information for the current working directory

func GetStatus

func GetStatus() (string, error)

GetStatus gets the git status information for the current working directory

Types

type Changes

type Changes struct {
	Modified []string            `json:"modified"`
	Added    []string            `json:"added"`
	Deleted  []string            `json:"deleted"`
	Unknown  []string            `json:"unknown"`
	Details  map[string][]string `json:"details"`
}

Changes represents git changes in the repository

func GetChanges

func GetChanges() (*Changes, error)

GetChanges gets detailed information about changes in the git repository

type FileStatus

type FileStatus string

FileStatus represents the status of a file in git

const (
	Modified FileStatus = "modified"
	Added    FileStatus = "added"
	Deleted  FileStatus = "deleted"
)

Jump to

Keyboard shortcuts

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