remoterepo

package
v16.2.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: MIT Imports: 8 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) ObjectHash

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

ObjectHash detects the object hash used by this particular repository.

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