summaryrefslogtreecommitdiff
path: root/shell.go
diff options
context:
space:
mode:
Diffstat (limited to 'shell.go')
-rw-r--r--shell.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/shell.go b/shell.go
index d9c7bcd..54b34c9 100644
--- a/shell.go
+++ b/shell.go
@@ -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 {