diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-16 14:30:16 -0800 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-16 14:30:16 -0800 |
commit | 5dae74118719e495b16733aca3c2607b9842f8dc (patch) | |
tree | 6868eace0f700029768affb480126afc2ce8eff4 | |
parent | bb88412570e604c1960ea3dd3bfc686f539576dc (diff) | |
download | gitlab-shell-5dae74118719e495b16733aca3c2607b9842f8dc.tar.gz |
Disable git-annex by default
-rw-r--r-- | CHANGELOG | 2 | ||||
-rw-r--r-- | config.yml.example | 2 | ||||
-rw-r--r-- | lib/gitlab_config.rb | 2 | ||||
-rw-r--r-- | spec/gitlab_shell_spec.rb | 8 |
4 files changed, 10 insertions, 4 deletions
@@ -1,5 +1,5 @@ v2.5.0 - - Support git-annex tool + - Support git-annex tool (disabled by default) v2.4.3 - Print broadcast message if one is available diff --git a/config.yml.example b/config.yml.example index 66ab52d..4a8df5f 100644 --- a/config.yml.example +++ b/config.yml.example @@ -50,4 +50,4 @@ audit_usernames: false # Enable git-annex support # git-annex allows managing files with git, without checking the file contents into git # See https://git-annex.branchable.com/ for documentation -git_annex_enabled: true +git_annex_enabled: false diff --git a/lib/gitlab_config.rb b/lib/gitlab_config.rb index 422898d..300d6ba 100644 --- a/lib/gitlab_config.rb +++ b/lib/gitlab_config.rb @@ -48,7 +48,7 @@ class GitlabConfig end def git_annex_enabled? - @config['git_annex_enabled'] ||= true + @config['git_annex_enabled'] ||= false end # Build redis command to write update event in gitlab queue diff --git a/spec/gitlab_shell_spec.rb b/spec/gitlab_shell_spec.rb index af978b4..5abeeb9 100644 --- a/spec/gitlab_shell_spec.rb +++ b/spec/gitlab_shell_spec.rb @@ -75,6 +75,8 @@ describe GitlabShell do let(:repo_path) { File.join(tmp_repos_path, 'dzaporozhets/gitlab.git') } before do + GitlabConfig.any_instance.stub(git_annex_enabled?: true) + # Create existing project FileUtils.mkdir_p(repo_path) cmd = %W(git --git-dir=#{repo_path} init --bare) @@ -187,7 +189,11 @@ describe GitlabShell do end describe 'git-annex' do - before { ssh_cmd 'git-annex-shell commit /~/gitlab-ci.git SHA256' } + before do + GitlabConfig.any_instance.stub(git_annex_enabled?: true) + ssh_cmd 'git-annex-shell commit /~/gitlab-ci.git SHA256' + end + after { subject.exec } it "should execute the command" do |