git

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeTreeHash

func ComputeTreeHash(repoURL, commit string) (string, error)

func ExtractRepoURLFromModulePath

func ExtractRepoURLFromModulePath(modulePath string) string

ExtractRepoURLFromModulePath extracts the repository URL from a module path, handling subpaths. For example:

  • github.com/user/repo -> github.com/user/repo
  • github.com/user/repo/subpath -> github.com/user/repo

func GetCommitForTag

func GetCommitForTag(repoURL, tag string) (string, error)

func GetGitRemoteURL

func GetGitRemoteURL(dir string) (string, error)

func InferModulePath

func InferModulePath(dir string) (string, error)

func IsGitRepo

func IsGitRepo(dir string) bool

func LsRemoteTags

func LsRemoteTags(repoURL string) ([]string, error)

func ModulePathToRepoURL

func ModulePathToRepoURL(modulePath string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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