couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [couchdb] branch optimize-doc-updates updated: Fix missing accumulator in couch_key_tree:multi_merge/2 foldl
Date Tue, 16 Jan 2018 21:36:07 GMT
This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to branch optimize-doc-updates
in repository https://gitbox.apache.org/repos/asf/couchdb.git


The following commit(s) were added to refs/heads/optimize-doc-updates by this push:
     new aa28003  Fix missing accumulator in couch_key_tree:multi_merge/2 foldl
aa28003 is described below

commit aa28003774d6c1d54e5a63652693a97ba8117ba2
Author: Nick Vatamaniuc <vatamane@apache.org>
AuthorDate: Tue Jan 16 16:12:48 2018 -0500

    Fix missing accumulator in couch_key_tree:multi_merge/2 foldl
---
 src/couch/src/couch_key_tree.erl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/couch/src/couch_key_tree.erl b/src/couch/src/couch_key_tree.erl
index c05ebe2..56491c2 100644
--- a/src/couch/src/couch_key_tree.erl
+++ b/src/couch/src/couch_key_tree.erl
@@ -75,8 +75,8 @@ stem/2
 %% @doc Merge multiple paths into the given tree.
 -spec multi_merge(revtree(), tree()) -> revtree().
 multi_merge(RevTree, Trees) ->
-    lists:foldl(fun(Tree) ->
-        {NewRevTree, _} = merge(RevTree, Tree),
+    lists:foldl(fun(Tree, RevTreeAcc) ->
+        {NewRevTree, _} = merge(RevTreeAcc, Tree),
         NewRevTree
     end, RevTree, lists:sort(Trees)).
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@couchdb.apache.org" <commits@couchdb.apache.org>'].

Mime
View raw message