git

package
v1.191.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLocalRepo

func GetLocalRepo() (*git.Repository, error)

func GetRepoConfig

func GetRepoConfig(repo *git.Repository) (*config.Config, error)

func OpenWorktreeAwareRepo added in v1.191.0

func OpenWorktreeAwareRepo(path string) (*git.Repository, error)

OpenWorktreeAwareRepo opens a Git repository at the given path, handling both regular repositories and worktrees correctly. It uses EnableDotGitCommonDir to properly support worktrees with access to the main repository's config, remotes, and references.

Types

type RepoInfo

type RepoInfo struct {
	LocalRepoPath     string
	LocalWorktree     *git.Worktree
	LocalWorktreePath string
	RepoUrl           string
	RepoOwner         string
	RepoName          string
	RepoHost          string
}

func GetRepoInfo

func GetRepoInfo(localRepo *git.Repository) (RepoInfo, error)

Jump to

Keyboard shortcuts

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