From 995f61a9a90945f80a0ec2ffe5cc527039263fca Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Thu, 14 Aug 2014 13:32:12 +0300 Subject: never accept empty config in commit --- lib/oxidized/output/git.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/oxidized/output') diff --git a/lib/oxidized/output/git.rb b/lib/oxidized/output/git.rb index e7725f9..0c73638 100644 --- a/lib/oxidized/output/git.rb +++ b/lib/oxidized/output/git.rb @@ -38,13 +38,12 @@ class Git < Output type_file = type + '/' + type_file type_repo = repo end - update type_repo, type_file, output unless output.empty? + update type_repo, type_file, output end - update type_repo, file, type_cfg unless type_cfg.empty? + update type_repo, file, type_cfg end - output = outputs.to_cfg - update repo, file, output unless output.empty? + update repo, file, outputs.to_cfg end @@ -66,6 +65,7 @@ class Git < Output private def update repo, file, data + return if data.empty? if @opt[:group] repo = File.join File.dirname(repo), @opt[:group] + '.git' end -- cgit v1.2.1