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
birkirb-git-1.1.1 lib/git/remote.rb
birkirb-git-1.1.2 lib/git/remote.rb
peterwald-git-1.1.2 lib/git/remote.rb
peterwald-git-1.1.3 lib/git/remote.rb
peterwald-git-1.1.4 lib/git/remote.rb
schacon-git-1.1.1 lib/git/remote.rb
schacon-git-1.2.0 lib/git/remote.rb
schacon-git-1.2.1 lib/git/remote.rb
schacon-git-1.2.2 lib/git/remote.rb
technicalpickles-git-1.1.1 lib/git/remote.rb
devise_sociable-0.1.0 vendor/bundle/gems/git-1.2.5/lib/git/remote.rb
ruby-git-lacravate-0.0.2 lib/git/remote.rb
ruby-git-lacravate-0.0.1 lib/git/remote.rb
dirty_history-0.7.3 dirty_history/ruby/1.9.1/gems/git-1.2.5/lib/git/remote.rb
dirty_history-0.7.2 dirty_history/ruby/1.9.1/gems/git-1.2.5/lib/git/remote.rb
dirty_history-0.7.1 dirty_history/ruby/1.9.1/gems/git-1.2.5/lib/git/remote.rb
dirty_history-0.7.0 dirty_history/ruby/1.9.1/gems/git-1.2.5/lib/git/remote.rb
dirty_history-0.6.7 dirty_history/ruby/1.9.1/gems/git-1.2.5/lib/git/remote.rb
dirty_history-0.6.6 dirty_history/ruby/1.9.1/gems/git-1.2.5/lib/git/remote.rb
dirty_history-0.6.5 dirty_history/ruby/1.9.1/gems/git-1.2.5/lib/git/remote.rb