Sha256: 54c0dd422c410f487bc17901d329e00e4852e7eb1c736e56be3a71e292d1683c

Contents?: true

Size: 677 Bytes

Versions: 53

Compression:

Stored size: 677 Bytes

Contents

module Git
  class Remote < Path
    
    attr_accessor :name, :url, :fetch_opts
    
    def initialize(base, name)
      @base = base
      config = @base.lib.config_remote(name)
      @name = name
      @url = config['url']
      @fetch_opts = config['fetch']
    end
    
    def fetch(opts={})
      @base.fetch(@name, opts)
    end
    
    # merge this remote locally
    def merge(branch = 'master')
      @base.merge("#{@name}/#{branch}")
    end
    
    def branch(branch = 'master')
      Git::Branch.new(@base, "#{@name}/#{branch}")
    end
    
    def remove
      @base.lib.remote_remove(@name)     
    end
    
    def to_s
      @name
    end
    
  end
end

Version data entries

53 entries across 53 versions & 15 rubygems

Version Path
cvss-suite-1.0.4 vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/remote.rb
cvss-suite-1.0.3 vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/remote.rb
cvss-suite-1.0.2 vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/remote.rb
cvss-suite-1.0.1 vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/remote.rb
cvss-suite-1.0.0 vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/remote.rb
git-1.3.0 lib/git/remote.rb
git-1.2.9.1 lib/git/remote.rb
git-1.2.9 lib/git/remote.rb
clc-git-1.2.8 lib/git/remote.rb
git-1.2.8 lib/git/remote.rb
spikegrobstein-git-1.2.7 lib/git/remote.rb
git-1.2.7 lib/git/remote.rb
arpm-0.9.0 lib/arpm/vendor/ruby-git/git/remote.rb