Skip to content

Commit 4a9acd1

Browse files
committed
Removed Dir.chdir from config_get.
We know this is safe because a- there is a bug where `build_list` is being called, but that's obviously a bug copied from `config_list`. Also, if `@git_dir` is non-nil, `#command` will already ensure the command is run within `@git_dir` as the working directory.
1 parent 840254e commit 4a9acd1

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

lib/git/lib.rb

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -332,15 +332,7 @@ def config_remote(name)
332332
end
333333

334334
def config_get(name)
335-
do_get = lambda do |path|
336-
command('config', ['--get', name])
337-
end
338-
339-
if @git_dir
340-
Dir.chdir(@git_dir, &do_get)
341-
else
342-
build_list.call
343-
end
335+
command('config', ['--get', name])
344336
end
345337

346338
def global_config_get(name)

0 commit comments

Comments
 (0)