aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Kovalov <iamolegkovalov@gmail.com>2020-07-06 16:41:03 +0200
committerOleg Kovalov <iamolegkovalov@gmail.com>2020-07-06 16:41:03 +0200
commitd872dd9af2091b0f2d2cf1e80827a3a8e18be64f (patch)
tree77952181a0126277a02925b1bb76093b06102341
parenta9899594dfdde8bbfdf35fc7e8c2fc3ec5aa7fdb (diff)
downloadgo-git-d872dd9af2091b0f2d2cf1e80827a3a8e18be64f.tar.gz
Skip error check explicitly
-rw-r--r--remote.go10
-rw-r--r--repository.go4
2 files changed, 8 insertions, 6 deletions
diff --git a/remote.go b/remote.go
index e642c57..2c5d806 100644
--- a/remote.go
+++ b/remote.go
@@ -218,9 +218,9 @@ func (r *Remote) newReferenceUpdateRequest(
if o.Progress != nil {
req.Progress = o.Progress
if ar.Capabilities.Supports(capability.Sideband64k) {
- req.Capabilities.Set(capability.Sideband64k)
+ _ = req.Capabilities.Set(capability.Sideband64k)
} else if ar.Capabilities.Supports(capability.Sideband) {
- req.Capabilities.Set(capability.Sideband)
+ _ = req.Capabilities.Set(capability.Sideband)
}
}
@@ -1037,11 +1037,13 @@ func (r *Remote) List(o *ListOptions) (rfs []*plumbing.Reference, err error) {
}
var resultRefs []*plumbing.Reference
- refs.ForEach(func(ref *plumbing.Reference) error {
+ err = refs.ForEach(func(ref *plumbing.Reference) error {
resultRefs = append(resultRefs, ref)
return nil
})
-
+ if err != nil {
+ return nil, err
+ }
return resultRefs, nil
}
diff --git a/repository.go b/repository.go
index 1f6de76..172029c 100644
--- a/repository.go
+++ b/repository.go
@@ -92,7 +92,7 @@ func Init(s storage.Storer, worktree billy.Filesystem) (*Repository, error) {
}
if worktree == nil {
- r.setIsBare(true)
+ _ = r.setIsBare(true)
return r, nil
}
@@ -408,7 +408,7 @@ func PlainCloneContext(ctx context.Context, path string, isBare bool, o *CloneOp
err = r.clone(ctx, o)
if err != nil && err != ErrRepositoryAlreadyExists {
if cleanup {
- cleanUpDir(path, cleanupParent)
+ _ = cleanUpDir(path, cleanupParent)
}
}