MCPcopy Create free account
hub / github.com/OpenAtomFoundation/SmartIDE / GetRepoName

Function GetRepoName

cli/pkg/common/sshremote.go:720–723  ·  view source on GitHub ↗

从git clone地址中获取repo的名称

(repoUrl string)

Source from the content-addressed store, hash-verified

718
719// 从git clone地址中获取repo的名称
720func GetRepoName(repoUrl string) string {
721 index := strings.LastIndex(repoUrl, "/")
722 return strings.Replace(repoUrl[index+1:], ".git", "", -1)
723}
724
725// 执行ssh command,在session模式下,standard output 只能在执行结束的时候获取到
726func (instance *SSHRemote) ExeSSHCommand(sshCommand string) (outContent string, err error) {

Callers 3

SparseCheckoutMethod · 0.85
DownloadFilesByGitMethod · 0.85
GitCloneMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected