Documentation
¶
Overview ¶
Package git provides a client for Git operations.
This package wraps common Git commands needed for ccmd operations, including cloning repositories, checking out tags, and querying repository information.
Index ¶
- func ParseRepositoryURL(url string) (string, error)
- type Client
- func (c *Client) CheckoutTag(repoPath, tag string) error
- func (c *Client) Clone(opts CloneOptions) error
- func (c *Client) GetCurrentCommit(repoPath string) (string, error)
- func (c *Client) GetLatestTag(repoPath string) (string, error)
- func (c *Client) GetTags(repoPath string) ([]string, error)
- func (c *Client) IsGitRepository(path string) bool
- func (c *Client) ValidateRemoteRepository(url string) error
- type CloneOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseRepositoryURL ¶
ParseRepositoryURL parses a repository URL and extracts repo name
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides git operations
func (*Client) CheckoutTag ¶
CheckoutTag checks out a specific tag in the repository
func (*Client) Clone ¶
func (c *Client) Clone(opts CloneOptions) error
Clone clones a repository with the given options
func (*Client) GetCurrentCommit ¶
GetCurrentCommit returns the current commit hash
func (*Client) GetLatestTag ¶
GetLatestTag returns the latest tag in the repository
func (*Client) IsGitRepository ¶
IsGitRepository checks if a directory is a git repository
func (*Client) ValidateRemoteRepository ¶
ValidateRemoteRepository checks if a remote repository exists
Click to show internal directories.
Click to hide internal directories.