From ab19315b3137e0e10a4e638c8ea37610adc592ba Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sun, 21 Jul 2019 06:10:00 +0200 Subject: 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 (cherry picked from commit 293e70fbceb5c81f33a96d5705f10785c6063db9) --- plumbing/object/merge_base.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plumbing/object/merge_base.go') 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 }) -- cgit