aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilip Navara <navara@emclient.com>2019-04-23 22:59:14 +0200
committerFilip Navara <navara@emclient.com>2019-04-23 22:59:14 +0200
commitb649682ff0b1b5141120a391a21b881bd1efa32b (patch)
tree3606455b34d704802265780c06001398ab12aae4
parent809027f163d2b7732b50d9cf7bbc501cc8ed3a1b (diff)
downloadgo-git-b649682ff0b1b5141120a391a21b881bd1efa32b.tar.gz
Reduce indentation
Signed-off-by: Filip Navara <navara@emclient.com>
-rw-r--r--plumbing/format/packfile/packfile.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/plumbing/format/packfile/packfile.go b/plumbing/format/packfile/packfile.go
index a9121c4..52eb338 100644
--- a/plumbing/format/packfile/packfile.go
+++ b/plumbing/format/packfile/packfile.go
@@ -489,14 +489,12 @@ func (i *objectIter) Next() (plumbing.EncodedObject, error) {
if typ != i.typ {
continue
}
- } else {
- if obj, ok := i.p.cacheGet(e.Hash); ok {
- if obj.Type() != i.typ {
- continue
- }
- return obj, nil
+ } else if obj, ok := i.p.cacheGet(e.Hash); ok {
+ if obj.Type() != i.typ {
+ continue
}
-
+ return obj, nil
+ } else {
h, err := i.p.objectHeaderAtOffset(int64(e.Offset))
if err != nil {
return nil, err