Merge branch '12626-merge-accounts'
[arvados.git] / services / api / app / models / commit.rb
index b0efbc7cb0c2c84c5ed4fb705b1e7dc5e88b5138..921c690cd00f78f6fc2b46bbace23fff89992db8 100644 (file)
@@ -2,10 +2,12 @@
 #
 # SPDX-License-Identifier: AGPL-3.0
 
+require 'request_error'
+
 class Commit < ActiveRecord::Base
   extend CurrentApiClient
 
-  class GitError < StandardError
+  class GitError < RequestError
     def http_status
       422
     end
@@ -219,7 +221,7 @@ class Commit < ActiveRecord::Base
   end
 
   def self.cache_dir_base
-    Rails.root.join 'tmp', 'git'
+    Rails.root.join 'tmp', 'git-cache'
   end
 
   def self.fetch_remote_repository gitdir, git_url