gitx

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckRepoState

func CheckRepoState(path string) (repoState report.RepoState, warnings []string)

CheckRepoState inspects the Git repository at path and returns its RepoState along with any non-fatal warnings encountered while collecting information.

func GetGitRepoStatesConcurrent

func GetGitRepoStatesConcurrent(
	paths []string,
	maxWorkers int,
) ([]report.RepoState, []string)

GetGitRepoStatesConcurrent gathers RepoState for each path concurrently using up to maxWorkers goroutines. It returns states sorted by Path and any warnings.

func GetRepoBranch

func GetRepoBranch(path string) (branchName string, err error)

GetRepoBranch returns the current branch name for the Git repository at path.

func GetRepoName

func GetRepoName(repoPath string) (string, error)

GetRepoName tries to extract the repository name from its remote URL, falling back to the first remote name or the local folder name if needed.

func GetUncommitedFiles

func GetUncommitedFiles(path string) (changes []string, err error)

GetUncommitedFiles returns the list of uncommitted files (status porcelain) for the Git repository at path.

func GetUpstreamStatus

func GetUpstreamStatus(path string) (ahead int, behind int, err error)

GetUpstreamStatus returns the ahead/behind counts relative to the upstream tracking branch for the repository at path.

func GitFetch added in v1.3.0

func GitFetch(path string) (string, error)

func GitPull added in v1.3.0

func GitPull(path string) (string, error)

func GitPush added in v1.3.0

func GitPush(path string) (string, error)

GitPush pushed git repo at given path using `git push` command and returns stdout of the command + error if any

func RunGitCommand

func RunGitCommand(dir string, args ...string) (string, error)

RunGitCommand executes a git command in dir and returns its stdout as a string. Stderr is discarded, and non-zero exit codes are returned as errors.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL