repo.go

 1// Package repository contains helper methods for working with a Git repo.
 2package repository
 3
 4// Repo represents a source code repository.
 5type Repo interface {
 6	// GetPath returns the path to the repo.
 7	GetPath() string
 8
 9	// GetUserEmail returns the email address that the user has used to configure git.
10	GetUserEmail() (string, error)
11
12	// GetCoreEditor returns the name of the editor that the user has used to configure git.
13	GetCoreEditor() (string, error)
14
15	// PullRefs pull git refs from a remote
16	PullRefs(remote string, refPattern string) error
17
18	// PushRefs push git refs to a remote
19	PushRefs(remote string, refPattern string) error
20}