Sha256: 7d23c891f76fe3d12db41d1e5059c6705ee9c1cd55580f8b8e66526055c5fb68

Contents?: true

Size: 723 Bytes

Versions: 135

Compression:

Stored size: 723 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 remove
      @base.remote_remove(@name)
    end
    
    def fetch
      @base.fetch(@name)
    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

135 entries across 108 versions & 16 rubygems

Version Path
redcar-0.5.2dev plugins/scm_git/vendor/ruby-git/lib/git/remote.rb
redcar-0.5.1dev plugins/scm_git/vendor/ruby-git/lib/git/remote.rb
redcar-0.4.1 plugins/scm_git/vendor/ruby-git/lib/git/remote.rb
redcar-0.4 plugins/scm_git/vendor/ruby-git/lib/git/remote.rb
opsb-git-1.2.5 lib/git/remote.rb
blackwinter-git-1.2.7 lib/git/remote.rb
blackwinter-git-1.2.6 lib/git/remote.rb
blackwinter-git-1.2.5 lib/git/remote.rb
git-1.2.5 lib/git/remote.rb
git-1.2.4 lib/git/remote.rb
git-1.2.3 lib/git/remote.rb
git-1.2.0 lib/git/remote.rb
git-1.2.2 lib/git/remote.rb
git-1.2.1 lib/git/remote.rb
git-1.1.1 lib/git/remote.rb