summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Aksola <anton.aksola@nebula.fi>2014-06-06 11:21:13 +0300
committerAnton Aksola <anton.aksola@nebula.fi>2014-06-06 11:21:13 +0300
commit7e6ecbdeb962ea0dda9ad75872aef05ca2760240 (patch)
treebc2338d142adb0fb2e3dbd56f6b0d63a72ccddac
parenta6431e29cf72e28fd151374bacea1a3b2c61c396 (diff)
fix: handle group in output git#fetch
-rw-r--r--lib/oxidized/output/git.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/oxidized/output/git.rb b/lib/oxidized/output/git.rb
index 2b07e05..70dd30f 100644
--- a/lib/oxidized/output/git.rb
+++ b/lib/oxidized/output/git.rb
@@ -44,7 +44,11 @@ class Git < Output
def fetch node, group
begin
- repo = Repo.new(@cfg.repo)
+ repo = @cfg.repo
+ if group
+ repo = File.join File.dirname(repo), group + '.git'
+ end
+ repo = Repo.new(repo)
(repo.tree / node).data
rescue
'node not found'