diff options
author | scott Chacon <schacon@agadorsparticus.(none)> | 2007-11-16 11:48:45 -0800 |
---|---|---|
committer | scott Chacon <schacon@agadorsparticus.(none)> | 2007-11-16 11:48:45 -0800 |
commit | be47ad8aea4f854fc2d6773456fb28f3e9f519e7 (patch) | |
tree | 9b91d912379e267f483e434627c391cc6c37f4c0 /lib/git/lib.rb | |
parent | 613757c2869dde6e8c600c55d065dba24e67097a (diff) | |
download | third_party-ruby-git-be47ad8aea4f854fc2d6773456fb28f3e9f519e7.tar.gz third_party-ruby-git-be47ad8aea4f854fc2d6773456fb28f3e9f519e7.tar.xz third_party-ruby-git-be47ad8aea4f854fc2d6773456fb28f3e9f519e7.zip |
added checkout_index
Diffstat (limited to 'lib/git/lib.rb')
-rw-r--r-- | lib/git/lib.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/git/lib.rb b/lib/git/lib.rb index 7742702..dbd3d69 100644 --- a/lib/git/lib.rb +++ b/lib/git/lib.rb @@ -380,6 +380,14 @@ module Git command('update-ref', [branch.to_s, commit.to_s]) end + def checkout_index(opts = {}) + arr_opts = [] + arr_opts << "--prefix=#{opts[:prefix]}" if opts[:prefix] + arr_opts << "--force" if opts[:force] + arr_opts << "--all" if opts[:all] + arr_opts << ('-- ' + opts[:path_limiter]) if opts[:path_limiter].is_a? String + command('checkout-index', arr_opts) + end # creates an archive file # |