diff options
author | Stan Hu <stanhu@gmail.com> | 2015-04-12 22:27:45 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-04-27 20:42:38 -0700 |
commit | 72a7febeada2c58c98caee8bb7ce18886a7c0868 (patch) | |
tree | 22cde467a3b87e93babb526b154003ffad12fef6 /app/helpers/submodule_helper.rb | |
parent | 9f443f42578f8f995415f3d0b9aa9ee8aebeff0b (diff) | |
download | gitlab-ce-72a7febeada2c58c98caee8bb7ce18886a7c0868.tar.gz |
Fix "Revspec not found" errors when viewing diffs in a forked project with submodules
Closes #1413
Diffstat (limited to 'app/helpers/submodule_helper.rb')
-rw-r--r-- | app/helpers/submodule_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/submodule_helper.rb b/app/helpers/submodule_helper.rb index e13d4eaf101..6def7793dc3 100644 --- a/app/helpers/submodule_helper.rb +++ b/app/helpers/submodule_helper.rb @@ -2,8 +2,8 @@ module SubmoduleHelper include Gitlab::ShellAdapter # links to files listing for submodule if submodule is a project on this server - def submodule_links(submodule_item, ref = nil) - url = @repository.submodule_url_for(ref, submodule_item.path) + def submodule_links(submodule_item, ref = nil, repository = @repository) + url = repository.submodule_url_for(ref, submodule_item.path) return url, nil unless url =~ /([^\/:]+)\/([^\/]+\.git)\Z/ |