git

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MapStatus map[git.StatusCode]project.Status = map[git.StatusCode]project.Status{
	git.Unmodified:         project.Unmodified,
	git.Untracked:          project.Untracked,
	git.Modified:           project.Modified,
	git.Added:              project.Added,
	git.Deleted:            project.Deleted,
	git.Renamed:            project.Renamed,
	git.Copied:             project.Copied,
	git.UpdatedButUnmerged: project.UpdatedButUnmerged,
}

Functions

This section is empty.

Types

type IGitService

type IGitService interface {
	CloneRepository(repo *gitprovider.GitRepository, auth *http.BasicAuth) error
	CloneRepositoryCmd(repo *gitprovider.GitRepository, auth *http.BasicAuth) []string
	RepositoryExists() (bool, error)
	SetGitConfig(userData *gitprovider.GitUser) error
	GetGitStatus() (*project.GitStatus, error)
}

type Service

type Service struct {
	ProjectDir        string
	GitConfigFileName string
	LogWriter         io.Writer
	OpenRepository    *git.Repository
}

func (*Service) CloneRepository

func (s *Service) CloneRepository(repo *gitprovider.GitRepository, auth *http.BasicAuth) error

func (*Service) CloneRepositoryCmd added in v0.22.0

func (s *Service) CloneRepositoryCmd(repo *gitprovider.GitRepository, auth *http.BasicAuth) []string

func (*Service) GetGitStatus added in v0.15.0

func (s *Service) GetGitStatus() (*project.GitStatus, error)

func (*Service) RepositoryExists

func (s *Service) RepositoryExists() (bool, error)

func (*Service) SetGitConfig

func (s *Service) SetGitConfig(userData *gitprovider.GitUser) error

Jump to

Keyboard shortcuts

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