summaryrefslogtreecommitdiffstats
path: root/lib/git/remote.rb
diff options
context:
space:
mode:
authorscott Chacon <schacon@agadorsparticus.(none)>2007-11-11 16:01:23 -0800
committerscott Chacon <schacon@agadorsparticus.(none)>2007-11-11 16:01:23 -0800
commit907b03949bab53e2f7d55094100a71abd22f23e7 (patch)
tree51b7fca355ac7007957d966cbebbcbf331c57d7d /lib/git/remote.rb
parentb81ee9305f418209ba0d77fbb7b47b23d4b121ca (diff)
downloadthird_party-ruby-git-907b03949bab53e2f7d55094100a71abd22f23e7.tar.gz
third_party-ruby-git-907b03949bab53e2f7d55094100a71abd22f23e7.tar.xz
third_party-ruby-git-907b03949bab53e2f7d55094100a71abd22f23e7.zip
added tagging
Diffstat (limited to 'lib/git/remote.rb')
-rw-r--r--lib/git/remote.rb25
1 files changed, 23 insertions, 2 deletions
diff --git a/lib/git/remote.rb b/lib/git/remote.rb
index 6956d47..e72a7f6 100644
--- a/lib/git/remote.rb
+++ b/lib/git/remote.rb
@@ -1,7 +1,7 @@
module Git
class Remote < Path
- attr_accessor :name, :url, :fetch
+ attr_accessor :name, :url, :fetch_opts
@base = nil
@@ -10,7 +10,28 @@ module Git
config = @base.lib.config_remote(name)
@name = name
@url = config['url']
- @fetch = config['fetch']
+ @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