diff options
author | scott Chacon <schacon@agadorsparticus.corp.reactrix.com> | 2007-11-15 15:19:33 -0800 |
---|---|---|
committer | scott Chacon <schacon@agadorsparticus.corp.reactrix.com> | 2007-11-15 15:19:33 -0800 |
commit | 877662762990b766d071ff272160e8a7bbe85441 (patch) | |
tree | 72e845ded8c864231df1e13f6b3bf88766bfa56f /lib/git | |
parent | 219fb3570565e9af3819149c6c5fa4df7347daf0 (diff) | |
download | third_party-ruby-git-877662762990b766d071ff272160e8a7bbe85441.tar.gz third_party-ruby-git-877662762990b766d071ff272160e8a7bbe85441.tar.xz third_party-ruby-git-877662762990b766d071ff272160e8a7bbe85441.zip |
new bare testing repo
Diffstat (limited to 'lib/git')
-rw-r--r-- | lib/git/lib.rb | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/lib/git/lib.rb b/lib/git/lib.rb index 71f3555..c196312 100644 --- a/lib/git/lib.rb +++ b/lib/git/lib.rb @@ -389,32 +389,17 @@ module Git def command(cmd, opts = {}) ENV['GIT_DIR'] = @git_dir - - if @git_index_file - ENV['GIT_INDEX_FILE'] = @git_index_file - else - ENV['GIT_INDEX_FILE'].delete rescue nil - end - - if @git_work_dir - ENV['GIT_WORK_TREE'] = @git_work_dir if @git_work_dir - else - ENV['GIT_WORK_TREE'].delete rescue nil - end - + 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(' ') git_cmd = "git #{cmd} #{opts}" out = `git #{cmd} #{opts} 2>&1`.chomp #puts path - #puts "gr: #{@git_dir}" #puts "gd: #{@git_work_dir}" #puts "gi: #{@git_index_file}" #puts "pp: #{@path}" - #puts ENV['GIT_DIR'] - #puts ENV['GIT_WORK_TREE'] - #puts ENV['GIT_INDEX_FILE'] #puts git_cmd #puts out #puts |