Commit 777f5b95 authored by jplang's avatar jplang
Browse files

Prevent unexpected nil error in GitAdapter#info if the repository path is invalid.

git-svn-id: https://svn.redmine.org/redmine/trunk@1239 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 8440879b
......@@ -94,11 +94,12 @@ module Redmine
def info
root_url = target('')
info = Info.new({:root_url => target(''),
:lastrev => revisions(root_url,nil,nil,{:limit => 1}).first
})
info
revs = revisions(url,nil,nil,{:limit => 1})
if revs && revs.any?
Info.new(:root_url => url, :lastrev => revs.first)
else
nil
end
rescue Errno::ENOENT => e
return nil
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment