   register 'added',
     update: (done) ->
       git._status (err, statuses) ->
-        statuses = _filter_statuses_by_desc statuses, 'added'
+        statuses = _filter_statuses_by_state statuses, 'added'
         count = _.where(statuses, {staged: true}).length
         done err, count


        path: path
        code: code
        staged: STATUS_CODE_MAP[code]?.staged
        desc: STATUS_CODE_MAP[code]?.desc

      done null, statuses

  # Get the number of "untracked" files
  # Untracked is defined as new files that are not staged
  register 'untracked',
    update: (done) ->
      git._status (err, statuses) ->
        statuses = _filter_statuses_by_desc(statuses, 'added')
        count = _.where(statuses, {staged: false}).length
        done err, count


_ = require 'underscore'

repo = git.open '.'

module.exports = (Impromptu, register, git) ->
  # Expose the repo object from the git-utils library
