diff options
| author | Jeff Carr <[email protected]> | 2025-10-04 23:30:58 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-04 23:30:58 -0500 |
| commit | 0aa1358d85745ee542a29787aa20d35fd2848b2e (patch) | |
| tree | 38cc81de73916c6aedbb2f7d9ce52d828c60532b /shell.go | |
| parent | 65b8cd957a152843da6999197346e1a4cf33bb87 (diff) | |
error handling in git diffv0.0.147
Diffstat (limited to 'shell.go')
| -rw-r--r-- | shell.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -178,14 +178,14 @@ func (repo *Repo) ConstructGitDiffLog(branch1, branch2 string) []string { } // count all objects only in branch1 -func (repo *Repo) CountDiffObjects(branch1, branch2 string) int { +func (repo *Repo) CountDiffObjects(branch1, branch2 string) (int, error) { cmd := repo.ConstructGitDiffLog(branch1, branch2) r, err := repo.RunVerboseOnError(cmd) if err != nil { - return -1 + return -1, err } // log.Info("countDiffObjects()", cmd, len(r.Stdout), strings.Join(r.Stdout, " ")) - return len(r.Stdout) + return len(r.Stdout), err } func (repo *Repo) RunPipe(cmd1 []string, cmd2 []string) cmd.Status { |
