Sha256: 1e5d22d453b19f52acefde5ecb7932a938db375dc781118248a13230190c878e

Contents?: true

Size: 537 Bytes

Versions: 49

Compression:

Stored size: 537 Bytes

Contents

module Rugged
  class Branch < Rugged::Reference
    def ==(other)
      other.instance_of?(Rugged::Branch) &&
        other.canonical_name == self.canonical_name
    end
    
    # Get the remote the branch belongs to.
    #
    # If the branch is remote returns the remote it belongs to.
    # In case of local branch, it returns the remote of the branch
    # it tracks or nil if there is no tracking branch.
    #
    def remote
      remote_name = self.remote_name
      @owner.remotes[remote_name] if remote_name
    end
  end
end

Version data entries

49 entries across 49 versions & 2 rubygems

Version Path
rugged-0.24.6.1 lib/rugged/branch.rb
rugged-0.24.5 lib/rugged/branch.rb
rugged-0.25.0b10 lib/rugged/branch.rb
rugged-0.25.0b9 lib/rugged/branch.rb
rugged-0.25.0b8 lib/rugged/branch.rb
rugged-0.25.0b7 lib/rugged/branch.rb
rugged-0.25.0b6 lib/rugged/branch.rb
rugged-0.25.0b5 lib/rugged/branch.rb
rugged-0.25.0b4 lib/rugged/branch.rb
rugged-0.25.0b3 lib/rugged/branch.rb
rugged-0.25.0b2 lib/rugged/branch.rb
rugged-0.25.0b1 lib/rugged/branch.rb
rugged-0.24.0 lib/rugged/branch.rb
rugged-0.24.0b14 lib/rugged/branch.rb
rugged-0.24.0b13 lib/rugged/branch.rb
rdavila-rugged-0.24.0b13 lib/rugged/branch.rb
rugged-0.24.0b12 lib/rugged/branch.rb
rugged-0.24.0b11 lib/rugged/branch.rb
rugged-0.24.0b9 lib/rugged/branch.rb
rugged-0.24.0b8 lib/rugged/branch.rb