diff options
author | Christian Muehlhaeuser <muesli@gmail.com> | 2019-07-21 06:10:00 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2019-07-29 17:35:27 +0200 |
commit | ab19315b3137e0e10a4e638c8ea37610adc592ba (patch) | |
tree | e779d0a6defd166816da90ecbce3179636f30000 /plumbing/object/merge_base.go | |
parent | e5c9c0dd9ff1f42dcdaba7a51919cf43abdb79f9 (diff) | |
download | go-git-ab19315b3137e0e10a4e638c8ea37610adc592ba.tar.gz |
plumbing/object: don't assign err from ForEach loop
Since we don't check the value anyway, as it can't possibly be anything but nil.
Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com>
(cherry picked from commit 293e70fbceb5c81f33a96d5705f10785c6063db9)
Diffstat (limited to 'plumbing/object/merge_base.go')
-rw-r--r-- | plumbing/object/merge_base.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plumbing/object/merge_base.go b/plumbing/object/merge_base.go index 689e421..6f2568d 100644 --- a/plumbing/object/merge_base.go +++ b/plumbing/object/merge_base.go @@ -32,7 +32,7 @@ func (c *Commit) MergeBase(other *Commit) ([]*Commit, error) { var res []*Commit inNewerHistory := isInIndexCommitFilter(newerHistory) resIter := NewFilterCommitIter(older, &inNewerHistory, &inNewerHistory) - err = resIter.ForEach(func(commit *Commit) error { + _ = resIter.ForEach(func(commit *Commit) error { res = append(res, commit) return nil }) |