X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/964ab3dd90ff1508efc0c77378cde2b3a4da1029..627fbeb0406fcdd9cdc9e90a6e9529f48dc37321:/services/api/app/models/commit_ancestor.rb diff --git a/services/api/app/models/commit_ancestor.rb b/services/api/app/models/commit_ancestor.rb index 71ea57fb95..419eca2e01 100644 --- a/services/api/app/models/commit_ancestor.rb +++ b/services/api/app/models/commit_ancestor.rb @@ -16,13 +16,13 @@ class CommitAncestor < ActiveRecord::Base @gitdirbase = Rails.configuration.git_repositories_dir self.is = nil Dir.foreach @gitdirbase do |repo| - next if repo.match /^\./ + next if repo.match(/^\./) git_dir = repo.match(/\.git$/) ? repo : File.join(repo, '.git') repo_name = repo.sub(/\.git$/, '') ENV['GIT_DIR'] = File.join(@gitdirbase, git_dir) - IO.foreach("|git rev-list --format=oneline '#{self.descendant.gsub /[^0-9a-f]/,""}'") do |line| + IO.foreach("|git rev-list --format=oneline '#{self.descendant.gsub(/[^0-9a-f]/,"")}'") do |line| self.is = false - sha1, message = line.strip.split(" ", 2) + sha1, _ = line.strip.split(" ", 2) if sha1 == self.ancestor self.is = true break