(repoDirPath string)
| 191 | } |
| 192 | |
| 193 | func (g gitOperation) GetRemoteName(repoDirPath string) string { |
| 194 | output, _ := EXEC.CombinedOutput("git remote show", repoDirPath) |
| 195 | tmpArray := strings.Split(strings.TrimSpace(output), "\n") |
| 196 | remoteName := tmpArray[len(tmpArray)-1] |
| 197 | return remoteName |
| 198 | } |
| 199 | |
| 200 | // 获取默认分支 |
| 201 | // e.g. git remote show $(git remote show|tail -1)|grep 'HEAD branch'|awk '{print $NF}' |
no test coverage detected