5 @working_directory = nil
9 # opens a Git Repository - no working directory options
10 def self.repo(git_dir)
11 self.new :repository => git_dir
14 # opens a new Git Project from a working directory
15 # you can specify non-standard git_dir and index file in the options
16 def self.open(working_dir, opts={})
17 default = {:working_directory => working_dir,
18 :repository => File.join(working_dir, '.git'),
19 :index => File.join(working_dir, '.git', 'index')}
20 git_options = default.merge(opts)
25 def initialize(options = {})
26 @working_directory = Git::Repository.new(options[:working_directory]) if options[:working_directory]
27 @repository = Git::Repository.new(options[:repository]) if options[:repository]
28 @index = Git::Index.new(options[:index]) if options[:index]
32 raise NotImplementedError
36 raise NotImplementedError
55 Git::Object.new(self, objectish)
59 Git::Log.new(self, count)
63 Git::Branches.new(self)
72 def revparse(objectish)
73 self.lib.revparse(objectish)