Skip to content

Commit 9cd9b38

Browse files
committed
Removed Dir.chdir from config_list.
We know this is safe because if `@git_dir` is non-nil, `#command_lines` will already ensure the command is run within `@git_dir` as the working directory.
1 parent 4a9acd1 commit 9cd9b38

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
@@ -340,15 +340,7 @@ def global_config_get(name)
340340
end
341341

342342
def config_list
343-
build_list = lambda do |path|
344-
parse_config_list command_lines('config', ['--list'])
345-
end
346-
347-
if @git_dir
348-
Dir.chdir(@git_dir, &build_list)
349-
else
350-
build_list.call
351-
end
343+
parse_config_list command_lines('config', ['--list'])
352344
end
353345

354346
def global_config_list

0 commit comments

Comments
 (0)