Documentation
¶
Index ¶
- func ExtractHost(url string) string
- func GetBranch(repoPath string) (string, error)
- func GetBranchWSL(distro, repoPath string) (string, error)
- func GetRemoteURL(repoPath string) (string, error)
- func GetRemoteURLWSL(distro, repoPath string) (string, error)
- func IsGitRepo(path string) bool
- func IsGitRepoWSL(distro, path string) bool
- type CommitInfo
- type RemoteStatus
- type RepoInfo
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBranchWSL ¶
GetBranchWSL returns the current branch name for a WSL repository
func GetRemoteURL ¶
GetRemoteURL returns the remote URL for the origin remote
func GetRemoteURLWSL ¶
GetRemoteURLWSL returns the remote URL for a WSL repository
func IsGitRepoWSL ¶
IsGitRepoWSL checks if a directory in WSL is a git repository
Types ¶
type CommitInfo ¶
CommitInfo represents information about a commit
func GetLastCommit ¶
func GetLastCommit(repoPath string) (*CommitInfo, error)
GetLastCommit returns information about the last commit
func GetLastCommitWSL ¶
func GetLastCommitWSL(distro, repoPath string) (*CommitInfo, error)
GetLastCommitWSL returns information about the last commit for a WSL repository
type RemoteStatus ¶
RemoteStatus represents remote tracking information
func GetRemoteStatus ¶
func GetRemoteStatus(repoPath string) (*RemoteStatus, error)
GetRemoteStatus returns ahead/behind counts compared to upstream
func GetRemoteStatusWSL ¶
func GetRemoteStatusWSL(distro, repoPath string) (*RemoteStatus, error)
GetRemoteStatusWSL returns ahead/behind counts for a WSL repository
type RepoInfo ¶
type RepoInfo struct {
Branch string
Commit *CommitInfo
RemoteURL string
Host string
}
RepoInfo combines branch, commit, and remote info (fetched in one call)
func GetRepoInfo ¶
GetRepoInfo gets branch, commit, and remote info in a single efficient call This is much faster than calling GetBranch, GetLastCommit, and GetRemoteURL separately