diff options
author | scott Chacon <schacon@agadorsparticus.(none)> | 2007-11-11 12:21:30 -0800 |
---|---|---|
committer | scott Chacon <schacon@agadorsparticus.(none)> | 2007-11-11 12:21:30 -0800 |
commit | abcb1453e210beb6de70a69d3501cf842b38636e (patch) | |
tree | 0612905ab3ec279694d2780b43274cb332757d1a /lib/git/base.rb | |
parent | 3cb57d82c301e9b8a16f30f468401e3007845bb7 (diff) | |
download | third_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.rb | 9 |
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 |