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
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/git-1.7.0/lib/git/remote.rb
git-1.7.0 lib/git/remote.rb
git-1.6.0 lib/git/remote.rb
git-1.6.0.pre1 lib/git/remote.rb
sigterm_extensions-0.0.4 lib/git/remote.rb
git-ce-1.5.0.2 lib/git/remote.rb
git-ce-1.5.0.1 lib/git/remote.rb
git-ce-1.5.0 lib/git/remote.rb
git-1.5.0 lib/git/remote.rb
git-1.4.0 lib/git/remote.rb
ruby-git-fw-new-1.3.3 lib/git/remote.rb
ruby-git-yz-1.3.3 lib/git/remote.rb
git-ng-1.4.0 lib/git/remote.rb
cvss-suite-1.0.8 vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/remote.rb
ruby-git-fw-1.3.2 lib/git/remote.rb
ruby-git-fw-1.3.1 lib/git/remote.rb
ruby-git-fw-1.3.0 lib/git/remote.rb
cvss-suite-1.0.7 vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/remote.rb
cvss-suite-1.0.6 vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/remote.rb
cvss-suite-1.0.5 vendor/cache/ruby/2.2.0/gems/git-1.3.0/lib/git/remote.rb