Throw error from GitRepository constructor

This commit is contained in:
Kevin Sawicki
2013-01-09 11:51:31 -08:00
parent 3e7f710b35
commit ba614d5549
3 changed files with 7 additions and 8 deletions

View File

@@ -23,8 +23,6 @@ class Git
constructor: (path) ->
@repo = new GitRepository(path)
unless @repo?
throw new Error("No Git repository found searching path: #{path}")
$(window).on 'focus', => @refreshIndex()
refreshIndex: -> @repo.refreshIndex()