       else
         result[user.email] = id
   result
+
+statFields = ['commits', 'percent', 'deletions', 'insertions']
 deduplicateUser = (users, emails)->
   # merge the user of the same email address
   t = users

      users
  .then (users)-> # sort by percent
    _.sortBy users, (committer)->
      return -committer.percent
  .then (users)-> # filter fields:
    if _.isArray(fields)
      users.forEach (user)->

        else
          u = usersCache[id]
        for k,v of user
          if v? and not (k in ['id', 'commits', 'percent', 'deletions', 'insertions'])
            if k is 'email' and _.isArray(u[k])
              u[k].push v unless v in u[k]
              continue
