diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-08-15 09:00:44 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-08-15 09:00:44 +0000 |
commit | 0da644072fa2a79bcb52883eb67838bc02dfc412 (patch) | |
tree | f86ad4c751360c01c32b5d71dc9b9a108321f3e2 /lib | |
parent | ae06b5dbc6afbd17dee8880928669bb4159964db (diff) | |
parent | d9b6fd4fba1fa996ba6c71358ad933ba2328ba18 (diff) | |
download | gitlab-ce-0da644072fa2a79bcb52883eb67838bc02dfc412.tar.gz |
Merge branch 'malformed-submodule' into 'master'
Handle missing .gitmodules when getting submodule urls
See merge request !13509
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/git/repository.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index afe4fb58ad0..38772d06dbd 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -811,6 +811,8 @@ module Gitlab return unless commit_object && commit_object.type == :COMMIT gitmodules = gitaly_commit_client.tree_entry(ref, '.gitmodules', Gitlab::Git::Blob::MAX_DATA_DISPLAY_SIZE) + return unless gitmodules + found_module = GitmodulesParser.new(gitmodules.data).parse[path] found_module && found_module['url'] |