diff options
author | scott Chacon <schacon@agadorsparticus.(none)> | 2007-11-11 11:03:03 -0800 |
---|---|---|
committer | scott Chacon <schacon@agadorsparticus.(none)> | 2007-11-11 11:03:03 -0800 |
commit | 440ec51cded64d49c5c2aae949401dd60e4b876d (patch) | |
tree | 2c5ea51e59e724203e7aceeed7d15d7b71d36690 /lib/git | |
parent | a4fa110279ea28873fe1e4df10c89ddc591046b4 (diff) | |
download | third_party-ruby-git-440ec51cded64d49c5c2aae949401dd60e4b876d.tar.gz third_party-ruby-git-440ec51cded64d49c5c2aae949401dd60e4b876d.tar.xz third_party-ruby-git-440ec51cded64d49c5c2aae949401dd60e4b876d.zip |
fixed a small environment bug
Diffstat (limited to 'lib/git')
-rw-r--r-- | lib/git/lib.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/git/lib.rb b/lib/git/lib.rb index d0dda8b..d857253 100644 --- a/lib/git/lib.rb +++ b/lib/git/lib.rb @@ -39,7 +39,7 @@ module Git # def clone(repository, name, opts = {}) @path = opts[:path] || '.' - clone_dir = File.join(@path, name) + opts[:path] ? clone_dir = File.join(@path, name) : clone_dir = name arr_opts = [] arr_opts << "--bare" if opts[:bare] @@ -225,9 +225,9 @@ module Git end def command(cmd, opts = {}) - ENV['GIT_DIR'] = @git_dir if @git_dir - ENV['GIT_INDEX_FILE'] = @git_index_file if @git_index_file - ENV['GIT_WORK_DIR'] = @git_work_dir if @git_work_dir + ENV['GIT_DIR'] = @git_dir + ENV['GIT_INDEX_FILE'] = @git_index_file + ENV['GIT_WORK_DIR'] = @git_work_dir path = @git_work_dir || @git_dir || @path Dir.chdir(path) do opts = opts.to_a.join(' ') |