#184: small refactoring according to Alexander's comment, added comments
This commit is contained in:
parent
e36a0386a2
commit
52621ad5dc
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue