remoterepo

package
v14.7.4 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 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 added in v14.4.0

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