X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/4e1dda28351f6b7aa91aa6baca8805e283f2694b..8b90f80efca772efd2697ffc70d7809c32564171:/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