X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/2d4263c16812a906589cbc13be26535a85691bd8..7a537556b3503bf957ad3da2bf27885518a33230:/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