X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/fb3c02b38a24cda422de95f2f8b49002b841cc72..e6c5563c60df03d4d061a6b301b730f0672b69a5:/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 c3c6d5376b..71ea57fb95 100644 --- a/services/api/app/models/commit_ancestor.rb +++ b/services/api/app/models/commit_ancestor.rb @@ -19,7 +19,7 @@ class CommitAncestor < ActiveRecord::Base 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, repo, '.git') + ENV['GIT_DIR'] = File.join(@gitdirbase, git_dir) IO.foreach("|git rev-list --format=oneline '#{self.descendant.gsub /[^0-9a-f]/,""}'") do |line| self.is = false sha1, message = line.strip.split(" ", 2) @@ -34,7 +34,7 @@ class CommitAncestor < ActiveRecord::Base end end if self.is.nil? - raise CommitNotFoundError: "Specified commit was not found" + raise CommitNotFoundError.new "Specified commit was not found" end end end