 module.exports =
 class Git
   @open: (path, options) ->
+    return null unless path
     try
       new Git(path, options)
     catch e

    @getRepo().isSubmodule(@relativize(path))

  refreshStatus: ->
    @statusTask = new RepositoryStatusTask(this).start()

_.extend Git.prototype, Subscriber
_.extend Git.prototype, EventEmitter

    working_dir_typechange: 1 << 10
    ignore: 1 << 14

  statuses: null

  constructor: (path, options={}) ->
    @statuses = {}
    @repo = GitRepository.open(path)
    refreshOnWindowFocus = options.refreshOnWindowFocus ? true
    if refreshOnWindowFocus
