diff --git a/app/helpers/git_helper.rb b/app/helpers/git_helper.rb index 9a9ecb90f..559deeeb3 100644 --- a/app/helpers/git_helper.rb +++ b/app/helpers/git_helper.rb @@ -5,7 +5,9 @@ module GitHelper # node.url(treeish) looks like: # - http://0.0.0.0:3000/abf/git@abf.rosalinux.ru:abf/rhel-scripts.git # - git://github.com/avokhmin/mdv-scripts.git - return nil unless url = node.url(treeish) + # - empty string if ".gitmodules" does not exist + url = node.url(treeish) + return nil if url.blank? url.gsub!(/.git$/, '') if url =~ /^git:/ url.gsub!(/^git/, 'http')