Skip to content
Snippets Groups Projects
Unverified Commit 9dfaf6ac authored by Paulo Gomes's avatar Paulo Gomes
Browse files

*: Remove redudant err nil checks


Signed-off-by: default avatarPaulo Gomes <pjbgf@linux.com>
parent dc2b346e
No related branches found
No related tags found
No related merge requests found
......@@ -84,11 +84,8 @@ func (w *Writer) OnFooter(h plumbing.Hash) error {
w.checksum = h
w.finished = true
_, err := w.createIndex()
if err != nil {
return err
}
return nil
return err
}
// creatIndex returns a filled MemoryIndex with the information filled by
......
......@@ -131,11 +131,7 @@ func (e *Encoder) entry(o *ObjectToPack) (err error) {
defer ioutil.CheckClose(or, &err)
_, err = io.Copy(e.zw, or)
if err != nil {
return err
}
return nil
return err
}
func (e *Encoder) writeBaseIfDelta(o *ObjectToPack) error {
......
......@@ -741,10 +741,7 @@ func (i *similarityIndex) add(key int, cnt uint64) error {
// It's the same key, so increment the counter.
var err error
i.hashes[j], err = newKeyCountPair(key, v.count()+cnt)
if err != nil {
return err
}
return nil
return err
} else if j+1 >= len(i.hashes) {
j = 0
} else {
......
......@@ -1250,11 +1250,7 @@ func (r *Remote) buildFetchedTags(refs memory.ReferenceStorage) (updated bool, e
// operation is complete, an error is returned. The context only affects to the
// transport operations.
func (r *Remote) ListContext(ctx context.Context, o *ListOptions) (rfs []*plumbing.Reference, err error) {
refs, err := r.list(ctx, o)
if err != nil {
return refs, err
}
return refs, nil
return r.list(ctx, o)
}
func (r *Remote) List(o *ListOptions) (rfs []*plumbing.Reference, err error) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment