class Git::Branch
Public Instance Methods
ahead()
click to toggle source
# File lib/git/status_all/git.rb, line 26 def ahead origin = self.remotes(:origin) return [] if origin.nil? @base.log.between(origin.full, self.name) end
ahead_count()
click to toggle source
# File lib/git/status_all/git.rb, line 38 def ahead_count @ahead_count ||= ahead.count end
behind()
click to toggle source
# File lib/git/status_all/git.rb, line 32 def behind origin = self.remotes(:origin) return [] if origin.nil? @base.log.between(self.name, origin.full) end
behind_count()
click to toggle source
# File lib/git/status_all/git.rb, line 42 def behind_count @behind_count ||= behind.count end
current?()
click to toggle source
# File lib/git/status_all/git.rb, line 18 def current? current end
remotes(remote_name = nil)
click to toggle source
# File lib/git/status_all/git.rb, line 46 def remotes(remote_name = nil) result = @base.branches.remote.select{|b| b.name == self.name } return result.select{|b| b.full.include? remote_name.to_s }.first unless remote_name.nil? return result end
up_to_date?()
click to toggle source
# File lib/git/status_all/git.rb, line 22 def up_to_date? ahead_count == 0 && behind_count == 0 end