From 880f1b7101ab773eaa5d2d0f28cd15d34296e8e7 Mon Sep 17 00:00:00 2001 From: Aaron Son Date: Fri, 6 Aug 2021 14:42:11 -0700 Subject: [PATCH] repoformat: format_repo.sh. --- go/libraries/doltcore/doltdb/commit.go | 20 +++++++++---------- .../env/actions/commitwalk/commitwalk.go | 10 +++++----- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go/libraries/doltcore/doltdb/commit.go b/go/libraries/doltcore/doltdb/commit.go index ad677ef72b..086c048511 100644 --- a/go/libraries/doltcore/doltdb/commit.go +++ b/go/libraries/doltcore/doltdb/commit.go @@ -159,19 +159,19 @@ func (c *Commit) Height() (uint64, error) { } func maxChunkHeight(v types.Value, nbf *types.NomsBinFormat) (max uint64, err error) { - err = v.WalkRefs(nbf, func(r types.Ref) error { - if height := r.Height(); height > max { - max = height - } + err = v.WalkRefs(nbf, func(r types.Ref) error { + if height := r.Height(); height > max { + max = height + } - return nil - }) + return nil + }) - if err != nil { - return 0, err - } + if err != nil { + return 0, err + } - return max, nil + return max, nil } func (c *Commit) getParent(ctx context.Context, idx int) (*types.Struct, error) { diff --git a/go/libraries/doltcore/env/actions/commitwalk/commitwalk.go b/go/libraries/doltcore/env/actions/commitwalk/commitwalk.go index 545ca4484f..2d90369e55 100644 --- a/go/libraries/doltcore/env/actions/commitwalk/commitwalk.go +++ b/go/libraries/doltcore/env/actions/commitwalk/commitwalk.go @@ -44,14 +44,14 @@ func (q *q) NumVisiblePending() int { } func (q *q) Push(x interface{}) { - q.pending = append(q.pending, x.(*c)) + q.pending = append(q.pending, x.(*c)) } func (q *q) Pop() interface{} { - old := q.pending - ret := old[len(old)-1] - q.pending = old[:len(old)-1] - return ret + old := q.pending + ret := old[len(old)-1] + q.pending = old[:len(old)-1] + return ret } func (q *q) Len() int {