You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2018/01/16 21:36:07 UTC
[couchdb] branch optimize-doc-updates updated: Fix missing
accumulator in couch_key_tree:multi_merge/2 foldl
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 <va...@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" <co...@couchdb.apache.org>'].