X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/f85c6cf14fada8b2ad4b6b7e6e7e9cf9852ce83d..49b58cc43218106f1633c389598894d59447a26b:/services/api/app/models/commit.rb diff --git a/services/api/app/models/commit.rb b/services/api/app/models/commit.rb index 8735741ce9..0f62737cea 100644 --- a/services/api/app/models/commit.rb +++ b/services/api/app/models/commit.rb @@ -12,13 +12,18 @@ class Commit < ActiveRecord::Base end def self.find_commit_range(current_user, repository, minimum, maximum, exclude) - if (minimum and !git_check_ref_format(minimum)) or !git_check_ref_format(maximum) - logger.warn "find_commit_range called with invalid minimum or maximum: '#{minimum}', '#{maximum}'" + if minimum and minimum.empty? + minimum = nil + end + + if minimum and !git_check_ref_format(minimum) + logger.warn "find_commit_range called with invalid minimum revision: '#{minimum}'" return nil end - if minimum and minimum.empty? - minimum = nil + if maximum and !git_check_ref_format(maximum) + logger.warn "find_commit_range called with invalid maximum revision: '#{maximum}'" + return nil end if !maximum @@ -88,6 +93,8 @@ class Commit < ActiveRecord::Base else commits.push(max_hash) if !resolved_exclude or !resolved_exclude.include? max_hash end + else + logger.warn "Repository #{r.name} exists in table but not found on disk" end end