From 511a054480ef46888f87f03bfe7358571f9c4e01 Mon Sep 17 00:00:00 2001 From: tzahij Date: Sun, 1 Nov 2020 23:44:40 +0200 Subject: [PATCH] Merge branch 'feature/overlap-diff-and-merge' into feature/merge-as-goroutine # Conflicts: # catalog/cataloger_merge.go After merge with overlap-diff-and-merge --- catalog/cataloger_merge.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/catalog/cataloger_merge.go b/catalog/cataloger_merge.go index 009a5ec8b49..eca5959198e 100644 --- a/catalog/cataloger_merge.go +++ b/catalog/cataloger_merge.go @@ -30,8 +30,9 @@ func (c *cataloger) Merge(ctx context.Context, repository, leftBranch, rightBran return nil, err } - mergeResult := &MergeResult{} - summary := make(map[DifferenceType]int) + mergeResult := &MergeResult{ + Summary: make(map[DifferenceType]int), + } _, err := c.db.Transact(func(tx db.Tx) (interface{}, error) { leftID, err := getBranchID(tx, repository, leftBranch, LockTypeUpdate) if err != nil { @@ -74,7 +75,7 @@ func (c *cataloger) Merge(ctx context.Context, repository, leftBranch, rightBran var rowsCounter int for scanner.Next() { v := scanner.Value() - summary[v.Type]++ + mergeResult.Summary[v.Type]++ rowsCounter++ if v.Type == DifferenceTypeConflict { return nil, ErrConflictFound @@ -112,7 +113,6 @@ func (c *cataloger) Merge(ctx context.Context, repository, leftBranch, rightBran if err != nil { return nil, err } - mergeResult.Summary = summary mergeResult.Reference = MakeReference(rightBranch, nextCommitID) for _, hook := range c.hooks.PostMerge {