Back to / internal / git-save

Package gitsave

Latest Go to latest

The highest tagged major version is .

Published: Feb 18, 2020 | License: Apache-2.0 | Module:


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

type GitSave

type GitSave struct {
	// contains filtered or unexported fields

func NewGitSave

func NewGitSave(logger *zap.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

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier