diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-02-18 14:19:35 +0100 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-02-18 14:19:35 +0100 |
commit | 5b6d347fcdb915a977369721bbc2545f17467cbb (patch) | |
tree | b7f14f50296ec7929f077f0f7a13ed92b79add6e /app | |
parent | 19b21c2e0ce1f6288172bd6fadc316f169048071 (diff) | |
download | gitlab-ce-autocrlf-lazy.tar.gz |
Handle raw_repository returning nil in exists?autocrlf-lazy
If path_with_namespace is nil Repository#raw_repository will also return
nil. Apparently code out there creates a Repository instance without a
namespace path. Right.
Diffstat (limited to 'app')
-rw-r--r-- | app/models/repository.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index 67155ac4f80..73aa67d46ec 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -38,6 +38,8 @@ class Repository end def exists? + return false unless raw_repository + raw_repository.rugged true rescue Gitlab::Git::Repository::NoRepository |