gogit

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2022 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cloner

type Cloner struct {
	Logger  Logger
	TempDir string
}

func (*Cloner) Clone

func (p *Cloner) Clone(ctx context.Context, origin string) (*Repository, error)

func (*Cloner) CloneInto

func (p *Cloner) CloneInto(ctx context.Context, origin string, into string) (*Repository, error)

type ExecErr

type ExecErr struct {
	Msg    string
	Stdout bytes.Buffer
	Stderr bytes.Buffer
	Base   error
}

func (*ExecErr) Error

func (e *ExecErr) Error() string

func (*ExecErr) Unwrap

func (e *ExecErr) Unwrap() error

type Logger

type Logger interface {
	Debug(ctx context.Context, msg string, strings map[string]string, ints map[string]int64)
	Info(ctx context.Context, msg string, strings map[string]string, ints map[string]int64)
}

type Repository

type Repository struct {
	// contains filtered or unexported fields
}

func (*Repository) AreThereUncommittedChanges

func (r *Repository) AreThereUncommittedChanges(ctx context.Context) (bool, error)

func (*Repository) CheckoutNewBranch

func (r *Repository) CheckoutNewBranch(ctx context.Context, branch string) error

func (*Repository) CommitAll

func (r *Repository) CommitAll(ctx context.Context, message string) error

func (*Repository) CurrentBranchName

func (r *Repository) CurrentBranchName(ctx context.Context) (string, error)

func (*Repository) GetUserEmail

func (r *Repository) GetUserEmail(ctx context.Context) (string, error)

func (*Repository) GetUserName

func (r *Repository) GetUserName(ctx context.Context) (string, error)

func (*Repository) GuessRemote

func (r *Repository) GuessRemote() (string, error)

func (*Repository) GuessRemoteHead

func (r *Repository) GuessRemoteHead(ctx context.Context, remoteName string) (string, error)

func (*Repository) GuessRemoteName

func (r *Repository) GuessRemoteName(ctx context.Context) (string, error)

func (*Repository) Location

func (r *Repository) Location() string

func (*Repository) SetUserNameAndEmailIfUnset

func (r *Repository) SetUserNameAndEmailIfUnset(ctx context.Context, name string, email string) error

type SilentLogger

type SilentLogger struct{}

func (SilentLogger) Debug

func (n SilentLogger) Debug(_ context.Context, _ string, _ map[string]string, _ map[string]int64)

func (SilentLogger) Info

func (n SilentLogger) Info(_ context.Context, _ string, _ map[string]string, _ map[string]int64)

Jump to

Keyboard shortcuts

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