cmd

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildFilterBranchExpression

func BuildFilterBranchExpression(committersRules []model.CommittersRule) string

BuildFilterBranchExpression returns filter branch expression.

func Clone

func Clone(path string, url string) bool

Clone clones repository to local.

func CopyRepository

func CopyRepository(repositoryFullPath string, destinationRepositoryName string, sourceRepositoryName string) bool

CopyRepository copies repository.

func Diff

func Diff(path string) bool

Diff returns git diff.

func Gc

func Gc()

Gc runs git GC.

func OverrideAuthor

func OverrideAuthor(path string, CommitsOverridingConfig model.CommitsOverriding) bool

OverrideAuthor overrides commits authors.

func Pull

func Pull(path string) bool

Pull fetch latest repository.

func Push

func Push(path string) bool

Push updates remote repository.

func RemoveTemporaryGitFolder

func RemoveTemporaryGitFolder(repositoryFullPath string) error

RemoveTemporaryGitFolder removes temp git folder.

func ResetHard

func ResetHard(path string) bool

ResetHard resets hard repository.

func RestoreGitFolder

func RestoreGitFolder(repositoryFullPath string, sourceRepositoryName string) error

RestoreGitFolder restores git folder.

func RewriteGitFiles

func RewriteGitFiles(repositoryFullPath string, destinationRepositoryName string) error

RewriteGitFiles rewrites git files.

func RmCached

func RmCached(path string) bool

RmCached flushes cache.

func Status

func Status(path string) bool

Status returns git status.

func TemporaryMoveGitFolder

func TemporaryMoveGitFolder(repositoryFullPath string, sourceRepositoryName string) error

TemporaryMoveGitFolder moves git folder.

Types

type Commit

type Commit struct {
	Hash        string
	Author      string
	AuthorEmail string
	ParentHash  string
	Subject     string
	Timestamp   int
}

Commit contains commit metadata.

func Log

func Log(path string, hashish string, limit int) ([]*Commit, error)

Log returns git log.

func NewCommit

func NewCommit(path, hashish string) (*Commit, error)

NewCommit returns commit metadata in Commit struct.

func (*Commit) String

func (commit *Commit) String() string

String returns commit metadata as string.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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