diff options
| author | Jeff Carr <[email protected]> | 2024-11-08 06:43:45 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-08 06:43:45 -0600 |
| commit | 29551667f0c1bca602870caba5921d3abcbe992e (patch) | |
| tree | 30ac8b894c973d3a01148fc74f7b8ae70e012252 /getPatches.go | |
| parent | ca00923762acf87139188c7fc6eac9f67107d7fe (diff) | |
use go-cmd/cmdv0.22.12
Diffstat (limited to 'getPatches.go')
| -rw-r--r-- | getPatches.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/getPatches.go b/getPatches.go index 44f662b..aaaa472 100644 --- a/getPatches.go +++ b/getPatches.go @@ -28,15 +28,15 @@ func (repo *RepoRow) GetPatches(oldname string, newname string) (int, []*Patch) // log.Info("repo userv, develv", userv, develv) gitcmd := []string{"git", "log", "--oneline", oldname + ".." + newname} log.Info("Run:", gitcmd) - err, output := repo.Status.RunCmd(gitcmd) - if err != nil { - log.Info("git failed ", repo.GoPath(), "err =", err) + r := repo.Status.Run(gitcmd) + if r.Error != nil { + log.Info("git failed ", repo.GoPath(), "err =", r.Error) return 0, nil } // patches = strings.Split(output, "\n") - log.Info("Run:", output) - for _, line := range strings.Split(output, "\n") { + log.Info("Run:", r.Stdout) + for _, line := range r.Stdout { line = strings.TrimSpace(line) if line == "" { continue @@ -98,9 +98,9 @@ func (r *RepoList) MakePatchset(setdir string) bool { // git format-patch branch1..branch2 gitcmd := []string{"git", "format-patch", "-o", repodir, develn + ".." + usern} log.Info("Run:", gitcmd) - err, output := repo.Status.RunCmd(gitcmd) - log.Info("output =", output) - if err == nil { + r := repo.Status.Run(gitcmd) + log.Info("output =", r.Stdout) + if r.Error == nil { log.Info("patches made okay for:", repo.GoPath()) continue } |
