gitrepo

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConfigSyncRoot sync_root key in config file
	ConfigSyncRoot = "syncRoot"
)
View Source
const DefaultSyncRoot = "./assets"

DefaultSyncRoot default sync root dir

View Source
const (
	// ProjectConfigName project leve config without prefix
	ProjectConfigName = ".git-syncer-config"
)

Variables

This section is empty.

Functions

func GetSyncRoot

func GetSyncRoot(r repository.ConfigReader) string

GetSyncRoot return sync root

func IsDirtyRepository

func IsDirtyRepository(git gitter.Status) (bool, error)

IsDirtyRepository check whether repository is dirty

func New

func New(options ...WithOptions) (repository.Repository, error)

New new gitrepo instance

Types

type Option

type Option struct {
	WorkingDir    string
	WorkingRemote string
	Gitter        gitter2.Gitter
}

Option option to init gitrepo

type WithOptions

type WithOptions = func(*Option) error

WithOptions func to initilize gitrepo options

func WithGitter

func WithGitter(gt gitter2.Gitter) WithOptions

WithGitter set gitter implement

func WithWorkingDir

func WithWorkingDir(dir string) WithOptions

WithWorkingDir change working dir

func WithWorkingRemote

func WithWorkingRemote(remote string) WithOptions

WithWorkingRemote set working remote

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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