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 /branches.go | |
| parent | 65b8cd957a152843da6999197346e1a4cf33bb87 (diff) | |
error handling in git diffv0.0.147
Diffstat (limited to 'branches.go')
| -rw-r--r-- | branches.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/branches.go b/branches.go index 490fd16..7b256bb 100644 --- a/branches.go +++ b/branches.go @@ -85,7 +85,10 @@ func (repo *Repo) DeleteLocalDevelBranch() error { return fmt.Errorf("no remote branch") } - b1 := repo.CountDiffObjects(branch, remote) // should be zero + b1, err := repo.CountDiffObjects(branch, remote) // should be zero + if err != nil { + return err + } if b1 == 0 { cmd := []string{"git", "branch", "-D", repo.GetDevelBranchName()} _, err := repo.RunVerboseOnError(cmd) |
