git

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const GitConfigPrefix = "git-syncer"

GitConfigPrefix prefix in git config

View Source
const ProjectConfigPath = "./.git-syncer-config"

ProjectConfigPath project level config file

Variables

This section is empty.

Functions

This section is empty.

Types

type Git

type Git struct {
}

Git gitter implementation

func New

func New() *Git

New new git

func (*Git) GetConfig

func (g *Git) GetConfig(key string) (string, error)

GetConfig implement GetConfig

func (*Git) GetHead

func (g *Git) GetHead() (string, error)

GetHead get repo head, symbolic -> sha1

func (*Git) GetHeadSHA1

func (g *Git) GetHeadSHA1() (string, error)

GetHeadSHA1 get repo head sha1

func (*Git) ListChangedFiles

func (g *Git) ListChangedFiles(path string, baseSha1 string) (amFiles []string, dFiles []string, err error)

ListChangedFiles list changed files between baseSha1 and head

func (*Git) ListTrackedFiles

func (g *Git) ListTrackedFiles(path string) ([]string, error)

ListTrackedFiles list all tracked files

func (*Git) PopHead

func (g *Git) PopHead(head string) error

PopHead checkout to head

func (*Git) PushHead

func (g *Git) PushHead(head string) (string, error)

PushHead checkout to head and return original head

func (*Git) SetConfig

func (g *Git) SetConfig(key, value string) error

SetConfig implement SetConfig

Jump to

Keyboard shortcuts

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