Documentation ¶
Index ¶
- type Client
- func (d *Client) Clone(ctx context.Context, path string, isBare bool, o *git.CloneOptions) (*git.Repository, error)
- func (d *Client) DefaultBranch() (*gitp.Reference, error)
- func (d *Client) Fetch(o *git.FetchOptions) error
- func (d *Client) PlainCheckout(o *git.CheckoutOptions) error
- func (d *Client) ResolveRevisionOrBranchHead(rev gitp.Revision) (*gitp.Hash, error)
- func (d *Client) Worktree() (*git.Worktree, error)
- type Cloner
- func (r *Cloner) Checkout(rev string, repo *git.Repository) error
- func (r *Cloner) Clone(path string) (*git.Repository, error)
- func (r *Cloner) CloneAndCheckout(dstPath, rev string) error
- func (r *Cloner) FetchAndCheckout(path, version string) error
- func (r *Cloner) ResolveRevisionOrBranchHead(rev string) (*gitp.Hash, error)
- type RepoClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) PlainCheckout ¶
func (*Client) ResolveRevisionOrBranchHead ¶
type Cloner ¶
type Cloner struct {
// contains filtered or unexported fields
}
func NewCloner ¶
func NewCloner(repoClient RepoClient, repo *reconciler.Repository, autoCheckout bool, logger *zap.SugaredLogger) (*Cloner, error)
func (*Cloner) Checkout ¶
Checkout checks out the given revision. revision can be 'main', a release version (e.g. 1.4.1), a commit hash (e.g. 34edf09a).
func (*Cloner) Clone ¶
Clone clones the repository from the given remote URL to the given `path` in the local filesystem.
func (*Cloner) CloneAndCheckout ¶
func (*Cloner) FetchAndCheckout ¶
type RepoClient ¶
type RepoClient interface { Clone(ctx context.Context, path string, isBare bool, o *git.CloneOptions) (*git.Repository, error) Worktree() (*git.Worktree, error) ResolveRevisionOrBranchHead(rev gitp.Revision) (*gitp.Hash, error) Fetch(o *git.FetchOptions) error PlainCheckout(o *git.CheckoutOptions) error DefaultBranch() (*gitp.Reference, error) }
func NewClientWithPath ¶
func NewClientWithPath(path string) (RepoClient, error)
Click to show internal directories.
Click to hide internal directories.