Documentation ¶
Overview ¶
Package gitfs implements a git cli based RCS backend. TODO(2.x) DEPRECATED and slated for removal in the 2.0.0 release.
Index ¶
- type Git
- func (g *Git) Add(ctx context.Context, files ...string) error
- func (g *Git) AddRemote(ctx context.Context, remote, url string) error
- func (g *Git) Cmd(ctx context.Context, name string, args ...string) error
- func (g *Git) Commit(ctx context.Context, msg string) error
- func (g *Git) Compact(ctx context.Context) error
- func (g *Git) ConfigGet(ctx context.Context, key string) (string, error)
- func (g *Git) ConfigList(ctx context.Context) (map[string]string, error)
- func (g *Git) ConfigSet(ctx context.Context, key, value string) error
- func (g *Git) Delete(ctx context.Context, name string) error
- func (g *Git) Exists(ctx context.Context, name string) bool
- func (g *Git) Fsck(ctx context.Context) error
- func (g *Git) Get(ctx context.Context, name string) ([]byte, error)
- func (g *Git) GetRevision(ctx context.Context, name, revision string) ([]byte, error)
- func (g *Git) HasStagedChanges(ctx context.Context) bool
- func (g *Git) InitConfig(ctx context.Context, userName, userEmail string) error
- func (g *Git) IsDir(ctx context.Context, name string) bool
- func (g *Git) IsInitialized() bool
- func (g *Git) List(ctx context.Context, prefix string) ([]string, error)
- func (g *Git) Name() string
- func (g *Git) Path() string
- func (g *Git) Prune(ctx context.Context, prefix string) error
- func (g *Git) Pull(ctx context.Context, remote, branch string) error
- func (g *Git) Push(ctx context.Context, remote, branch string) error
- func (g *Git) PushPull(ctx context.Context, op, remote, branch string) error
- func (g *Git) RemoveRemote(ctx context.Context, remote string) error
- func (g *Git) Revisions(ctx context.Context, name string) ([]backend.Revision, error)
- func (g *Git) Set(ctx context.Context, name string, value []byte) error
- func (g *Git) Status(ctx context.Context) ([]byte, error)
- func (g *Git) String() string
- func (g *Git) Version(ctx context.Context) semver.Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Git ¶
type Git struct {
// contains filtered or unexported fields
}
Git is a cli based git backend
func Clone ¶
Clone clones an existing git repo and returns a new cli based git backend configured for this clone repo
func (*Git) ConfigList ¶
ConfigList returns all git config settings
func (*Git) GetRevision ¶
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 ¶
HasStagedChanges returns true if there are any staged changes which can be committed
func (*Git) InitConfig ¶
InitConfig initialized and preparse the git config
func (*Git) IsInitialized ¶
IsInitialized returns true if this stores has an (probably) initialized .git folder
func (*Git) List ¶
List returns a list of all entities e.g. foo, far/bar baz/.bang directory separator are normalized using `/`
func (*Git) PushPull ¶
PushPull pushes the repo to it's origin. optional arguments: remote and branch
func (*Git) RemoveRemote ¶
RemoveRemote removes a remote
func (*Git) Revisions ¶
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