Method: Rugged::Branch#remote

Defined in:
lib/rugged/branch.rb

#remoteObject

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.

[View source]

19
20
21
22
# File 'lib/rugged/branch.rb', line 19

def remote
  remote_name = self.remote_name
  @owner.remotes[remote_name] if remote_name
end