Refresh index and status after opening repo

Previously this relied on an initial window focus event firing
to kick off the initial load.  This focus event no longer fires
in jquery 2.0 so just explicitly refresh the index and status when
setting the project path.
This commit is contained in:
Kevin Sawicki 2013-10-30 14:41:01 -07:00
parent 49e48a0895
commit b9274412c5

View File

@ -118,7 +118,9 @@ class Project
if projectPath?
directory = if fsUtils.isDirectorySync(projectPath) then projectPath else path.dirname(projectPath)
@rootDirectory = new Directory(directory)
@repo = Git.open(projectPath, project: this)
if @repo = Git.open(projectPath, project: this)
@repo.refreshIndex()
@repo.refreshStatus()
else
@rootDirectory = null