summaryrefslogtreecommitdiffstats
path: root/lib/git
diff options
context:
space:
mode:
authorscott Chacon <schacon@agadorsparticus.(none)>2007-11-16 13:24:30 -0800
committerscott Chacon <schacon@agadorsparticus.(none)>2007-11-16 13:24:30 -0800
commitbc60052b519b8b991e50b8ccb30f2b76ad125996 (patch)
treec7e50409f58e58c852793544a901850498c00f9b /lib/git
parentbe47ad8aea4f854fc2d6773456fb28f3e9f519e7 (diff)
downloadthird_party-ruby-git-bc60052b519b8b991e50b8ccb30f2b76ad125996.tar.gz
third_party-ruby-git-bc60052b519b8b991e50b8ccb30f2b76ad125996.tar.xz
third_party-ruby-git-bc60052b519b8b991e50b8ccb30f2b76ad125996.zip
updated the docs
Diffstat (limited to 'lib/git')
-rw-r--r--lib/git/lib.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/git/lib.rb b/lib/git/lib.rb
index dbd3d69..76223de 100644
--- a/lib/git/lib.rb
+++ b/lib/git/lib.rb
@@ -427,11 +427,11 @@ module Git
end
def command(cmd, opts = {})
- 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
+ ENV['GIT_DIR'] = @git_dir if (@git_dir != ENV['GIT_DIR'])
+ ENV['GIT_INDEX_FILE'] = @git_index_file if (@git_index_file != ENV['GIT_INDEX_FILE'])
+ ENV['GIT_WORK_DIR'] = @git_work_dir if (@git_work_dir != ENV['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
@@ -449,7 +449,7 @@ module Git
raise Git::GitExecuteError.new(git_cmd + ':' + out.to_s)
end
out
- end
+ #end
end
end