Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoSuchRemote = errors.New("no such remote")
View Source
var ErrNotRepository = errors.New("not a git repository")
Functions ¶
This section is empty.
Types ¶
type GitCli ¶
type GitCli interface { tools.ExternalTool GetRemoteUrl(ctx context.Context, string, remoteName string) (string, error) ShallowClone(ctx context.Context, repositoryPath string, branch string, target string) error InitRepo(ctx context.Context, repositoryPath string) error AddRemote(ctx context.Context, repositoryPath string, remoteName string, remoteUrl string) error UpdateRemote(ctx context.Context, repositoryPath string, remoteName string, remoteUrl string) error GetCurrentBranch(ctx context.Context, repositoryPath string) (string, error) GetRepoRoot(ctx context.Context, repositoryPath string) (string, error) AddFile(ctx context.Context, repositoryPath string, filespec string) error Commit(ctx context.Context, repositoryPath string, message string) error PushUpstream(ctx context.Context, repositoryPath string, origin string, branch string) error IsUntrackedFile(ctx context.Context, repositoryPath string, filePath string) (bool, error) SetCredentialStore(ctx context.Context, repositoryPath string) error ListStagedFiles(ctx context.Context, repositoryPath string) (string, error) AddFileExecPermission(ctx context.Context, repositoryPath string, file string) error // make current repo to use gh-cli as credential helper. SetGitHubAuthForRepo(ctx context.Context, repositoryPath, credential, ghPath string) error }
func NewGitCli ¶
func NewGitCli(commandRunner exec.CommandRunner) GitCli
Click to show internal directories.
Click to hide internal directories.