gitsave

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GitAddRemote

func GitAddRemote(configPath, name, url string) error

func GitDir

func GitDir() (string, error)

GitDir returns the git dir relative to the working dir

func GitPush

func GitPush(configPath, remote, branch string) error

Types

type GitSave

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

func NewGitSave

func NewGitSave(log zerolog.Logger, conf *GitSaveConfig) *GitSave

func (*GitSave) RefsPrefix

func (s *GitSave) RefsPrefix() string

func (*GitSave) Save

func (s *GitSave) Save(message, branchName string) (string, error)

Save adds files to the provided index, creates a tree and a commit pointing to that tree, finally it creates a branch poiting to that commit Save will use the current worktree index if available to speed the index generation

type GitSaveConfig

type GitSaveConfig struct {
	AddUntracked bool
	AddIgnored   bool
	RefsPrefix   string
}

Jump to

Keyboard shortcuts

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