diff options
| author | Jeff Carr <[email protected]> | 2024-02-14 02:35:47 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-02-14 02:35:47 -0600 |
| commit | 73d711ad2b2ebb311fadf9ab3739589df890993a (patch) | |
| tree | 1febfc8449a863920b536e79d7e33e1d35d8150a /git.go | |
| parent | d7e391fed0843aa56ead128737c2770704846bac (diff) | |
trying to improve older code
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'git.go')
| -rw-r--r-- | git.go | 20 |
1 files changed, 16 insertions, 4 deletions
@@ -332,6 +332,14 @@ func (rs *RepoStatus) GetStatus() string { } // TODO: make this report the error somewhere +// This is supposed to check all the branches to make sure +// the are the same. that was originally what this was for +// now I think it's jsut probably dumb old code that doesn't +// need to be here + +// actually, this is to attempt to verify absolutely everything +// is pushed upstream before doing a rm -rf ~/go/src +// TODO: revisit this code in the autotypist later func (rs *RepoStatus) CheckBranches() bool { var hashCheck string var perfect bool = true @@ -363,17 +371,21 @@ func (rs *RepoStatus) CheckBranches() bool { } var cmd []string cmd = append(cmd, "git", "show", "-s", "--format=%ci", hash) - _, _, output := RunCmd(rs.realPath.String(), cmd) + err, output := rs.RunCmd(cmd) + if err != nil { + // log.Log(WARN, "cmd failed", cmd, "err =", err, "in", rs.String()) + } // git show -s --format=%ci <hash> will give you the time // log.Log(INFO, fullfile) if hash == hashCheck { log.Log(INFO, hash, output, b) } else { - log.Warn("UNKNOWN BRANCHES IN THIS REPO") + // log.Log(WARN, rs.String(), hash, output, b) + // log.Log(WARN, "UNKNOWN BRANCHES IN THIS REPO", cmd) rs.versionCmdOutput.SetText("UNKNOWN BRANCHES") perfect = false - parts := strings.Split(b, "/") - log.Warn("git push", parts) + // parts := strings.Split(b, "/") + // log.Warn("git push", parts) } } return perfect |
