Skip to content

Commit 22b05a0

Browse files
author
root
committed
Fix #351
1 parent ebb0859 commit 22b05a0

File tree

1 file changed

+4
-2
lines changed
  • lib/redmine_git_hosting/commands

1 file changed

+4
-2
lines changed

Diff for: lib/redmine_git_hosting/commands/git.rb

+4-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def sudo_get_git_global_params(namespace)
8080
params = []
8181
end
8282

83-
git_config_as_hash(params)
83+
git_config_as_hash(namespace, params)
8484
end
8585

8686

@@ -111,10 +111,12 @@ def prefix_key(namespace, key)
111111
end
112112

113113

114-
def git_config_as_hash(params)
114+
def git_config_as_hash(namespace, params)
115115
value_hash = {}
116116

117117
params.each do |value_pair|
118+
next if value_pair.empty?
119+
next if !value_pair.start_with?(namespace)
118120
global_key = value_pair.split(' ')[0]
119121
value = value_pair.split(' ')[1]
120122
key = global_key.split('.')[1]

0 commit comments

Comments
 (0)