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
git-1.15.0 lib/git/remote.rb
git-1.14.0 lib/git/remote.rb
git-1.13.2 lib/git/remote.rb
git-1.13.1 lib/git/remote.rb
git-1.13.0 lib/git/remote.rb
lg_pod_plugin-1.0.8 lib/git/remote.rb
lg_pod_plugin-1.0.7 lib/git/remote.rb
lg_pod_plugin-1.0.6 lib/git/remote.rb
git-1.12.0 lib/git/remote.rb
git-1.11.0 lib/git/remote.rb
git-1.10.2 lib/git/remote.rb
git-1.10.1 lib/git/remote.rb
git-1.10.0 lib/git/remote.rb
git-1.9.1 lib/git/remote.rb
git-1.9.0 lib/git/remote.rb
p-mongo-git-1.8.1 lib/git/remote.rb
git-1.8.1 lib/git/remote.rb
git-1.8.0 lib/git/remote.rb
git-glimmer-1.7.0 lib/git/remote.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/git-1.7.0/lib/git/remote.rb