diff options
author | Ahmad Sherif <me@ahmadsherif.com> | 2018-01-18 17:33:35 +0000 |
---|---|---|
committer | Ahmad Sherif <me@ahmadsherif.com> | 2018-01-24 12:10:31 +0100 |
commit | 24625323a826d70991fdf27fbbe1f39bee845c03 (patch) | |
tree | 8c7b3e7c949638ae1be4d655345f798e2d9bea9e /lib/gitlab/git | |
parent | e2a56af930f9f7d17a6a9b638f52007a60e4cc60 (diff) | |
download | gitlab-ce-24625323a826d70991fdf27fbbe1f39bee845c03.tar.gz |
Migrate repository bundling to Gitalyfeature/migrate-bundle-to-disk-to-gitaly
Closes gitaly#929
Diffstat (limited to 'lib/gitlab/git')
-rw-r--r-- | lib/gitlab/git/repository.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index d666362de0d..9864e4251f1 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -1268,6 +1268,18 @@ module Gitlab success || gitlab_projects_error end + def bundle_to_disk(save_path) + gitaly_migrate(:bundle_to_disk) do |is_enabled| + if is_enabled + gitaly_repository_client.create_bundle(save_path) + else + run_git!(%W(bundle create #{save_path} --all)) + end + end + + true + end + # rubocop:disable Metrics/ParameterLists def multi_action( user, branch_name:, message:, actions:, |