Skip to content

Commit e40e074

Browse files
cyclotron3kjcouball
authored andcommitted
Include version.rb, providing Git::VERSION (#436)
Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as Indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by: cyclotron3k <aidan.samuel@gmail.com>
1 parent a107e87 commit e40e074

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

lib/git.rb

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
require 'git/status'
2020
require 'git/stash'
2121
require 'git/stashes'
22+
require 'git/version'
2223
require 'git/working_directory'
2324

2425
lib = Git::Lib.new(nil, nil)
@@ -34,15 +35,15 @@
3435
# and more. You should be able to do most fundamental git
3536
# operations with this library.
3637
#
37-
# This module provides the basic functions to open a git
38+
# This module provides the basic functions to open a git
3839
# reference to work with. You can open a working directory,
3940
# open a bare repository, initialize a new repo or clone an
4041
# existing remote repository.
4142
#
4243
# Author:: Scott Chacon (mailto:schacon@gmail.com)
4344
# License:: MIT License
4445
module Git
45-
46+
4647
#g.config('user.name', 'Scott Chacon') # sets value
4748
#g.config('user.email', 'email@email.com') # sets value
4849
#g.config('user.name') # returns 'Scott Chacon'
@@ -82,7 +83,7 @@ def global_config(name = nil, value = nil)
8283
def self.bare(git_dir, options = {})
8384
Base.bare(git_dir, options)
8485
end
85-
86+
8687
# clones a remote repository
8788
#
8889
# options
@@ -110,7 +111,7 @@ def self.export(repository, name, options = {})
110111
repo.checkout("origin/#{options[:branch]}") if options[:branch]
111112
Dir.chdir(repo.dir.to_s) { FileUtils.rm_r '.git' }
112113
end
113-
114+
114115
# Same as g.config, but forces it to be at the global level
115116
#
116117
#g.config('user.name', 'Scott Chacon') # sets value
@@ -139,8 +140,8 @@ def self.global_config(name = nil, value = nil)
139140
def self.init(working_dir = '.', options = {})
140141
Base.init(working_dir, options)
141142
end
142-
143-
# returns a Hash containing information about the references
143+
144+
# returns a Hash containing information about the references
144145
# of the target repository
145146
#
146147
# @param [String|NilClass] location the target repository location or nil for '.'
@@ -150,7 +151,7 @@ def self.ls_remote(location=nil)
150151
end
151152

152153
# open an existing git working directory
153-
#
154+
#
154155
# this will most likely be the most common way to create
155156
# a git reference, referring to a working directory.
156157
# if not provided in the options, the library will assume
@@ -162,5 +163,5 @@ def self.ls_remote(location=nil)
162163
def self.open(working_dir, options = {})
163164
Base.open(working_dir, options)
164165
end
165-
166+
166167
end

0 commit comments

Comments
 (0)