remoterepo

package
v15.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo

type Repo struct {
	*gitalypb.Repository
	// contains filtered or unexported fields
}

Repo represents a Git repository on a different Gitaly storage

func New

func New(ctx context.Context, repo *gitalypb.Repository, pool *client.Pool) (*Repo, error)

New creates a new remote Repository from its protobuf representation.

func (*Repo) GetDefaultBranch

func (rr *Repo) GetDefaultBranch(ctx context.Context) (git.ReferenceName, error)

GetDefaultBranch returns the default branch for the remote repository. It does so by invoking `FindDefaultBranchName()`, which itself is a wrapper around `localrepo.GetDefaultBranch()`. Semantics of this function thus match the localrepo semantics.

func (*Repo) HasBranches

func (rr *Repo) HasBranches(ctx context.Context) (bool, error)

HasBranches will dial to the remote repository and check whether the repository has any branches.

func (*Repo) ResolveRevision

func (rr *Repo) ResolveRevision(ctx context.Context, revision git.Revision) (git.ObjectID, error)

ResolveRevision will dial to the remote repository and attempt to resolve the revision string via the gRPC interface.

Jump to

Keyboard shortcuts

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