diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /lib/gitlab/git | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) | |
download | gitlab-ce-6438df3a1e0fb944485cebf07976160184697d72.tar.gz |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'lib/gitlab/git')
-rw-r--r-- | lib/gitlab/git/changed_path.rb | 18 | ||||
-rw-r--r-- | lib/gitlab/git/diff_collection.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/git/repository.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/git/wiki_page_version.rb | 7 |
4 files changed, 28 insertions, 3 deletions
diff --git a/lib/gitlab/git/changed_path.rb b/lib/gitlab/git/changed_path.rb new file mode 100644 index 00000000000..033779466f6 --- /dev/null +++ b/lib/gitlab/git/changed_path.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +module Gitlab + module Git + class ChangedPath + attr_reader :status, :path + + def initialize(status:, path:) + @status = status + @path = path + end + + def new_file? + status == :ADDED + end + end + end +end diff --git a/lib/gitlab/git/diff_collection.rb b/lib/gitlab/git/diff_collection.rb index 8df4bc3de05..19462e6cb02 100644 --- a/lib/gitlab/git/diff_collection.rb +++ b/lib/gitlab/git/diff_collection.rb @@ -13,7 +13,7 @@ module Gitlab def self.default_limits(project: nil) if Feature.enabled?(:increased_diff_limits, project) - { max_files: 200, max_lines: 7500 } + { max_files: 300, max_lines: 10000 } else { max_files: 100, max_lines: 5000 } end diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index f6601379202..e316d52ac05 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -801,7 +801,8 @@ module Gitlab # forced - should we use --force flag? # no_tags - should we use --no-tags flag? # prune - should we use --prune flag? - def fetch_remote(remote, ssh_auth: nil, forced: false, no_tags: false, prune: true) + # check_tags_changed - should we ask gitaly to calculate whether any tags changed? + def fetch_remote(remote, ssh_auth: nil, forced: false, no_tags: false, prune: true, check_tags_changed: false) wrapped_gitaly_errors do gitaly_repository_client.fetch_remote( remote, @@ -809,6 +810,7 @@ module Gitlab forced: forced, no_tags: no_tags, prune: prune, + check_tags_changed: check_tags_changed, timeout: GITLAB_PROJECTS_TIMEOUT ) end diff --git a/lib/gitlab/git/wiki_page_version.rb b/lib/gitlab/git/wiki_page_version.rb index 475a9d4d1b9..efe39fa852c 100644 --- a/lib/gitlab/git/wiki_page_version.rb +++ b/lib/gitlab/git/wiki_page_version.rb @@ -10,7 +10,12 @@ module Gitlab @format = format end - delegate :message, :sha, :id, :author_name, :authored_date, to: :commit + delegate :message, :sha, :id, :author_name, :author_email, :authored_date, to: :commit + + def author_url + user = ::User.find_by_any_email(author_email) + user.nil? ? "mailto:#{author_email}" : Gitlab::UrlBuilder.build(user) + end end end end |