Make project's Git repository a window global

This allows it to operate independently of the
project and mirror the availability of the root view
and project.
This commit is contained in:
Kevin Sawicki
2013-02-27 17:50:37 -08:00
parent 219a8581fd
commit 2ec4d558ba
10 changed files with 36 additions and 31 deletions

View File

@@ -419,12 +419,10 @@ class Buffer
return match[0][0] != '\t'
undefined
getRepo: -> @project?.repo
checkoutHead: ->
path = @getPath()
return unless path
if @getRepo()?.checkoutHead(path)
if git?.checkoutHead(path)
@trigger 'git-status-changed'
scheduleStoppedChangingEvent: ->