diff --git a/lib/git.rb b/lib/git.rb index 1992dc1d..c0b32b99 100644 --- a/lib/git.rb +++ b/lib/git.rb @@ -19,6 +19,7 @@ require 'git/status' require 'git/stash' require 'git/stashes' +require 'git/version' require 'git/working_directory' lib = Git::Lib.new(nil, nil) @@ -34,7 +35,7 @@ # and more. You should be able to do most fundamental git # operations with this library. # -# This module provides the basic functions to open a git +# This module provides the basic functions to open a git # reference to work with. You can open a working directory, # open a bare repository, initialize a new repo or clone an # existing remote repository. @@ -42,7 +43,7 @@ # Author:: Scott Chacon (mailto:schacon@gmail.com) # License:: MIT License module Git - + #g.config('user.name', 'Scott Chacon') # sets value #g.config('user.email', 'email@email.com') # sets value #g.config('user.name') # returns 'Scott Chacon' @@ -82,7 +83,7 @@ def global_config(name = nil, value = nil) def self.bare(git_dir, options = {}) Base.bare(git_dir, options) end - + # clones a remote repository # # options @@ -110,7 +111,7 @@ def self.export(repository, name, options = {}) repo.checkout("origin/#{options[:branch]}") if options[:branch] Dir.chdir(repo.dir.to_s) { FileUtils.rm_r '.git' } end - + # Same as g.config, but forces it to be at the global level # #g.config('user.name', 'Scott Chacon') # sets value @@ -139,8 +140,8 @@ def self.global_config(name = nil, value = nil) def self.init(working_dir = '.', options = {}) Base.init(working_dir, options) end - - # returns a Hash containing information about the references + + # returns a Hash containing information about the references # of the target repository # # @param [String|NilClass] location the target repository location or nil for '.' @@ -150,7 +151,7 @@ def self.ls_remote(location=nil) end # open an existing git working directory - # + # # this will most likely be the most common way to create # a git reference, referring to a working directory. # if not provided in the options, the library will assume @@ -162,5 +163,5 @@ def self.ls_remote(location=nil) def self.open(working_dir, options = {}) Base.open(working_dir, options) end - + end