couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iil...@apache.org
Subject [1/5] couch commit: updated refs/heads/master to 1bcf525
Date Thu, 23 Jun 2016 17:51:55 GMT
Repository: couchdb-couch
Updated Branches:
  refs/heads/master 411c130ea -> 1bcf52545


Dead code elimination


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/17279852
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/17279852
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/17279852

Branch: refs/heads/master
Commit: 1727985212cf2658f5c46a26f8ac57046af188aa
Parents: 411c130
Author: ILYA Khlopotov <iilyak@ca.ibm.com>
Authored: Wed Jun 22 10:29:11 2016 -0700
Committer: ILYA Khlopotov <iilyak@ca.ibm.com>
Committed: Wed Jun 22 10:29:11 2016 -0700

----------------------------------------------------------------------
 src/couch_changes.erl | 26 ++++++++++----------------
 1 file changed, 10 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/17279852/src/couch_changes.erl
----------------------------------------------------------------------
diff --git a/src/couch_changes.erl b/src/couch_changes.erl
index 75ec1cd..beac089 100644
--- a/src/couch_changes.erl
+++ b/src/couch_changes.erl
@@ -804,25 +804,19 @@ changes_row(Results, DocInfo, Acc) ->
 maybe_get_changes_doc(Value, #changes_acc{include_docs=true}=Acc) ->
     #changes_acc{
         db = Db,
-        include_docs = IncDoc,
         doc_options = DocOpts,
         conflicts = Conflicts
     } = Acc,
-    case IncDoc of
-        true ->
-            Opts = case Conflicts of
-                true -> [deleted, conflicts];
-                false -> [deleted]
-            end,
-            Doc = couch_index_util:load_doc(Db, Value, Opts),
-            case Doc of
-                null ->
-                    [{doc, null}];
-                _ ->
-                    [{doc, couch_doc:to_json_obj(Doc, DocOpts)}]
-            end;
-        false ->
-            []
+    Opts = case Conflicts of
+        true -> [deleted, conflicts];
+        false -> [deleted]
+    end,
+    Doc = couch_index_util:load_doc(Db, Value, Opts),
+    case Doc of
+        null ->
+            [{doc, null}];
+        _ ->
+            [{doc, couch_doc:to_json_obj(Doc, DocOpts)}]
     end;
 maybe_get_changes_doc(_Value, _Acc) ->
     [].


Mime
View raw message