# Functions
No description provided by the author
IsPathUnderGitManagement
@Description: IsPathUnderGitManagement check path is under git management.
RepositoryConfigPath
cfg, err := git_tools.RepositoryConfigPath(projectRootPath) if err != nil { t.Fatal(err) } t.Logf("config: %v", cfg.Remotes["origin"].URLs[0])
more use See https://github.com/go-git/go-git/blob/v5.7.0/config/config_test.go#L18.
RepositoryFistRemoteInfo
url, err := git_tools.RepositoryFistRemoteInfo(projectRootPath, "origin") if err != nil { t.Fatal(err) } t.Logf("url.Host: %s", url.Host) t.Logf("url.User: %s", url.User) t.Logf("url.Repo: %s", url.Repo)
See: https://mirrors.edge.kernel.org/pub/software/scm/git/docs/git-clone.html.
No description provided by the author
No description provided by the author
# Structs
No description provided by the author