summaryrefslogtreecommitdiffstats
path: root/lib/git/base.rb
diff options
context:
space:
mode:
authorscott Chacon <schacon@agadorsparticus.(none)>2007-11-11 12:21:30 -0800
committerscott Chacon <schacon@agadorsparticus.(none)>2007-11-11 12:21:30 -0800
commitabcb1453e210beb6de70a69d3501cf842b38636e (patch)
tree0612905ab3ec279694d2780b43274cb332757d1a /lib/git/base.rb
parent3cb57d82c301e9b8a16f30f468401e3007845bb7 (diff)
downloadthird_party-ruby-git-abcb1453e210beb6de70a69d3501cf842b38636e.tar.gz
third_party-ruby-git-abcb1453e210beb6de70a69d3501cf842b38636e.tar.xz
third_party-ruby-git-abcb1453e210beb6de70a69d3501cf842b38636e.zip
added branch and checkout functionality
Diffstat (limited to 'lib/git/base.rb')
-rw-r--r--lib/git/base.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/git/base.rb b/lib/git/base.rb
index 46c75eb..342d535 100644
--- a/lib/git/base.rb
+++ b/lib/git/base.rb
@@ -124,6 +124,11 @@ module Git
Git::Branches.new(self)
end
+ def branch(branch_name = 'master')
+ Git::Branch.new(self, branch_name)
+ end
+
+
def lib
Git::Lib.new(self)
end
@@ -162,6 +167,10 @@ module Git
opts = {:add_all => true}.merge(opts)
self.lib.commit(message, opts)
end
+
+ def checkout(branch, opts = {})
+ self.lib.checkout(branch, opts)
+ end
# convenience methods