git

package
v0.0.0-...-af7dd4a Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2022 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MODIFIED = ChangedFileStatus("M")
)

Variables

This section is empty.

Functions

func Add

func Add(file string) error

func CallPostCommitHooks

func CallPostCommitHooks(conf *config.Config)

func CallPreCommitHooks

func CallPreCommitHooks(conf *config.Config)

func CommitToStdout

func CommitToStdout(commit string) error

func GetCurrentBranchName

func GetCurrentBranchName() (string, error)

func GetRepositoryRoot

func GetRepositoryRoot() (string, error)

func PromptFilesToAdd

func PromptFilesToAdd(out prompt.ConsoleWriter, filesName []string, changedFiles []*ChangedFile) error

func Remove

func Remove(file string) error

func RunGitCommand

func RunGitCommand(params ...string) (string, error)

func SetTrackStatus

func SetTrackStatus(file string, tracked bool) error

Types

type ChangedFile

type ChangedFile struct {
	Name    string
	Status  ChangedFileStatus
	Tracked bool
}

func GetChangedFiles

func GetChangedFiles() ([]*ChangedFile, error)

type ChangedFileStatus

type ChangedFileStatus string

Jump to

Keyboard shortcuts

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