gopass: github.com/justwatchcom/gopass/pkg/backend/rcs/git/cli Index | Files

package cli

import "github.com/justwatchcom/gopass/pkg/backend/rcs/git/cli"

Index

Package Files

config.go git.go loader.go

type Git Uses

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

Git is a cli based git backend

func Clone Uses

func Clone(ctx context.Context, repo, path string) (*Git, error)

Clone clones an existing git repo and returns a new cli based git backend configured for this clone repo

func Init Uses

func Init(ctx context.Context, path, userName, userEmail string) (*Git, error)

Init initializes this store's git repo

func Open Uses

func Open(path, gpg string) (*Git, error)

Open creates a new git cli based git backend

func (*Git) Add Uses

func (g *Git) Add(ctx context.Context, files ...string) error

Add adds the listed files to the git index

func (*Git) AddRemote Uses

func (g *Git) AddRemote(ctx context.Context, remote, url string) error

AddRemote adds a new remote

func (*Git) Cmd Uses

func (g *Git) Cmd(ctx context.Context, name string, args ...string) error

Cmd runs an git command

func (*Git) Commit Uses

func (g *Git) Commit(ctx context.Context, msg string) error

Commit creates a new git commit with the given commit message

func (*Git) ConfigGet Uses

func (g *Git) ConfigGet(ctx context.Context, key string) (string, error)

ConfigGet returns a given config value

func (*Git) ConfigList Uses

func (g *Git) ConfigList(ctx context.Context) (map[string]string, error)

ConfigList returns all git config settings

func (*Git) ConfigSet Uses

func (g *Git) ConfigSet(ctx context.Context, key, value string) error

ConfigSet sets a local config value

func (*Git) GetRevision Uses

func (g *Git) GetRevision(ctx context.Context, name, revision string) ([]byte, error)

GetRevision will return the content of any revision of the named entity see https://git-scm.com/docs/git-log#_pretty_formats

func (*Git) HasStagedChanges Uses

func (g *Git) HasStagedChanges(ctx context.Context) bool

HasStagedChanges returns true if there are any staged changes which can be committed

func (*Git) InitConfig Uses

func (g *Git) InitConfig(ctx context.Context, userName, userEmail string) error

InitConfig initialized and preparse the git config

func (*Git) IsInitialized Uses

func (g *Git) IsInitialized() bool

IsInitialized returns true if this stores has an (probably) initialized .git folder

func (*Git) Name Uses

func (g *Git) Name() string

Name returns git

func (*Git) Pull Uses

func (g *Git) Pull(ctx context.Context, remote, branch string) error

Pull pulls from the git remote

func (*Git) Push Uses

func (g *Git) Push(ctx context.Context, remote, branch string) error

Push pushes to the git remote

func (*Git) PushPull Uses

func (g *Git) PushPull(ctx context.Context, op, remote, branch string) error

PushPull pushes the repo to it's origin. optional arguments: remote and branch

func (*Git) RemoveRemote Uses

func (g *Git) RemoveRemote(ctx context.Context, remote string) error

RemoveRemote removes a remote

func (*Git) Revisions Uses

func (g *Git) Revisions(ctx context.Context, name string) ([]backend.Revision, error)

Revisions will list all available revisions of the named entity see http://blog.lost-theory.org/post/how-to-parse-git-log-output/ and https://git-scm.com/docs/git-log#_pretty_formats

func (*Git) Version Uses

func (g *Git) Version(ctx context.Context) semver.Version

Version returns the git version as major, minor and patch level

Package cli imports 19 packages (graph). Updated 2019-10-31. Refresh now. Tools for package owners.