summaryrefslogtreecommitdiff
path: root/lib/oxidized
diff options
context:
space:
mode:
authorDanilo Sousa <dsgoncalves@uoldiveo.com>2016-02-22 14:16:29 -0300
committerDanilo Sousa <dsgoncalves@uoldiveo.com>2016-02-22 14:16:29 -0300
commit69210c7ddf7d77cc9eb7b78f0bc00ad2f1475955 (patch)
tree4872e339aacfe6aa75bad26718dc3489b6cacfe9 /lib/oxidized
parentc098f57f5dfc4588673ac62083611736c8a75136 (diff)
follow the hook remotes config also for groups repositories
ref.: https://github.com/ytti/oxidized/pull/326/files#r53557892
Diffstat (limited to 'lib/oxidized')
-rw-r--r--lib/oxidized/node.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/oxidized/node.rb b/lib/oxidized/node.rb
index a1504b9..35bcad9 100644
--- a/lib/oxidized/node.rb
+++ b/lib/oxidized/node.rb
@@ -171,14 +171,12 @@ module Oxidized
end
def resolve_repo
- git = Oxidized.config.output.git
- cfg_repo = git.repo
+ remote_repo = Oxidized.config.output.git.repo
- if group && !git.single_repo?
- basedir = File.dirname(cfg_repo)
- File.join(basedir, "#{group}.git")
+ if Oxidized.config.output.git.single_repo? || @group.nil? || remote_repo.is_a?(String)
+ remote_repo
else
- cfg_repo
+ remote_repo[@group]
end
end