pouchdb/pouchdb — pull request #1988 by nolanlawson (2014-04-19 20:56:43+00:00)
Title: (#1988) - smarter upsert, only updates doc when necessary

You guys were right to say that upsert() had
code smell. One of the dumb things it does
is update the document whether we need to
or not.

So in the case of persisted mapreduce,
every time you do query(), a new change is
written to the _local/dependentDbs doc,
which is pure waste. This fixes that.