Documentation ¶
Index ¶
- Constants
- Variables
- func AddFileToStage(m Manager, path string) error
- func AddModifiedFilesToStage(m Manager) error
- func CheckIfFileStaged(m Manager) bool
- func GetImagesNameAdded(ctx *context.Context, m Manager) ([]string, error)
- func GetImagesNameRemoved(m Manager) ([]string, error)
- func GetStageFilesChanged(m Manager) []string
- func HasUntrackedFiles(m Manager) bool
- type Git
- func (g Git) AddWithOptions(opts *git.AddOptions) error
- func (g Git) CommitFileContent(hash *plumbing.Hash, path string) (string, error)
- func (g Git) CreateCommit(msg string, opts *git.CommitOptions) (plumbing.Hash, error)
- func (g Git) GetCommitFilesChanged(hash string) ([]string, error)
- func (g Git) ResolveRevision(in plumbing.Revision) (*plumbing.Hash, error)
- func (g Git) Status() (git.Status, error)
- type Manager
- type Repository
- type Worktree
Constants ¶
View Source
const ( Added = "+" Updated = "*" Removed = "-" NoUpdate = "" )
Variables ¶
Functions ¶
func AddFileToStage ¶
func AddModifiedFilesToStage ¶
func CheckIfFileStaged ¶
func GetImagesNameAdded ¶
func GetImagesNameRemoved ¶
func GetStageFilesChanged ¶
func HasUntrackedFiles ¶
Types ¶
type Git ¶
type Git struct {
// contains filtered or unexported fields
}
func (Git) AddWithOptions ¶
func (Git) CommitFileContent ¶
func (Git) CreateCommit ¶
func (Git) GetCommitFilesChanged ¶
func (Git) ResolveRevision ¶
type Manager ¶
type Manager interface { Status() (git.Status, error) ResolveRevision(in plumbing.Revision) (*plumbing.Hash, error) CommitFileContent(hash *plumbing.Hash, path string) (string, error) AddWithOptions(opts *git.AddOptions) error CreateCommit(msg string, opts *git.CommitOptions) (plumbing.Hash, error) GetCommitFilesChanged(hash string) ([]string, error) }
type Repository ¶
Click to show internal directories.
Click to hide internal directories.