From a85509f5e288c9ccc70400f2ce93842e57a1af23 Mon Sep 17 00:00:00 2001 From: nopedial Date: Sat, 26 Oct 2013 00:16:19 +0200 Subject: add fetch API to git output --- lib/oxidized/output/git.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/oxidized/output/git.rb') diff --git a/lib/oxidized/output/git.rb b/lib/oxidized/output/git.rb index 202893c..f23b35a 100644 --- a/lib/oxidized/output/git.rb +++ b/lib/oxidized/output/git.rb @@ -37,6 +37,15 @@ class Git < Output end end + def fetch node, group + begin + repo = Repo.new(@cfg[:repo]) + (repo.tree / node).data + rescue + 'node not found' + end + end + private def update_repo repo, file, data, msg, actor -- cgit v1.2.1