##// END OF EJS Templates
Prevent unexpected nil error in GitAdapter#info if the repository path is invalid....
Jean-Philippe Lang -
r1225:ea161c9ea408
parent child
Show More
@@ -94,11 +94,12 module Redmine
94 94
95 95
96 96 def info
97 root_url = target('')
98 info = Info.new({:root_url => target(''),
99 :lastrev => revisions(root_url,nil,nil,{:limit => 1}).first
100 })
101 info
97 revs = revisions(url,nil,nil,{:limit => 1})
98 if revs && revs.any?
99 Info.new(:root_url => url, :lastrev => revs.first)
100 else
101 nil
102 end
102 103 rescue Errno::ENOENT => e
103 104 return nil
104 105 end
General Comments 0
You need to be logged in to leave comments. Login now