Documentation ¶
Index ¶
- func OpenGitRepository(path string) (*git.Repository, error)
- type ListRefsFunc
- type Repository
- func (r *Repository) FetchRemoteRepository(ctx context.Context) error
- func (r *Repository) InitEmptyRepository() (*git.Repository, error)
- func (r *Repository) InitializeDefaultBranches(repo *git.Repository) error
- func (r *Repository) InitializeOrigin(repo *git.Repository) error
- func (r *Repository) ListRefs(ctx context.Context, listRefsFunc ListRefsFunc) error
- func (r *Repository) PushAndCleanup(ctx context.Context, specs, require []config.RefSpec) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OpenGitRepository ¶
Types ¶
type Repository ¶
type Repository struct { Name string Namespace string OriginName string DefaultMainReferenceName plumbing.ReferenceName DefaultFetchSpec []config.RefSpec URL string Directory string CredentialSecret string CredentialResolver auth.CredentialResolver UserInfoProvider auth.UserInfoProvider Repo *git.Repository // contains filtered or unexported fields }
func (*Repository) FetchRemoteRepository ¶
func (r *Repository) FetchRemoteRepository(ctx context.Context) error
func (*Repository) InitEmptyRepository ¶
func (r *Repository) InitEmptyRepository() (*git.Repository, error)
initEmptyRepository initializes an empty bare repository
func (*Repository) InitializeDefaultBranches ¶
func (r *Repository) InitializeDefaultBranches(repo *git.Repository) error
initializeDefaultBranches
func (*Repository) InitializeOrigin ¶
func (r *Repository) InitializeOrigin(repo *git.Repository) error
func (*Repository) ListRefs ¶
func (r *Repository) ListRefs(ctx context.Context, listRefsFunc ListRefsFunc) error
func (*Repository) PushAndCleanup ¶
pushes the local reference to the remote repository
Click to show internal directories.
Click to hide internal directories.