 # Fetch and return a list of all references in the repo
 getUpToDateRefs = (repo, callback) ->
   logger.debug "Fetching updates"
+  interval = spinner()
   repo.fetchAll getOpts().fetchOpts
     .then ->
+      clearInterval interval
       logger.debug "Fetched successfully"
       return repo.getReferences(nodegit.Reference.TYPE.LISTALL)
     .then (reflist) ->


cloneRepo = (repoUrl, targetDir, callback) ->
  logger.info "Cloning from #{repoUrl}"
  opts = getOpts()
  nodegit.Clone.clone repoUrl, targetDir, opts
    .then (repo) ->
      logger.debug 'Cloned successfully'
      callback null, repo
    .catch (err) ->
      logger.error "Operation failed (#{err})"

path = require 'path'
async = require 'async'
minimatch = require 'minimatch'
spinner = require 'char-spinner'

config = require './config'
cache = require './cache'
