diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-03-18 12:21:17 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-03-18 12:21:17 +0000 |
commit | 52f73187516ebd2c6aa1f0df7df4d4f233dc17d2 (patch) | |
tree | 13c5f00c6fa8ec2ab658d023e89d93f77c4927b4 | |
parent | 22b36aec8b8e0a49b4b33a11ac5f972e50cbd000 (diff) | |
parent | 55210648ef259e6ac167bb877decc919b292c0fd (diff) | |
download | gitlab-shell-52f73187516ebd2c6aa1f0df7df4d4f233dc17d2.tar.gz |
Merge branch 'fix/git-annex-ssh' into 'master'
v2.6.12
Fix git-annex issue when using SSH on a custom port
Easiest thing here is to use the full repo path on the server side.
Fixes https://gitlab.com/gitlab-org/gitlab-ee/issues/166
See merge request !45
-rw-r--r-- | CHANGELOG | 3 | ||||
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | lib/gitlab_shell.rb | 5 | ||||
-rw-r--r-- | spec/gitlab_shell_spec.rb | 11 |
4 files changed, 16 insertions, 5 deletions
@@ -1,3 +1,6 @@ +v2.6.12 + - Fix git-annex issue not working using custom SSH port repositories + v2.6.11 - Increase HTTP timeout and log request durations - Workaround for a Webrick issue on Ruby 2.2 @@ -1 +1 @@ -2.6.11 +2.6.12 diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb index 96ee1b7..365c543 100644 --- a/lib/gitlab_shell.rb +++ b/lib/gitlab_shell.rb @@ -101,9 +101,8 @@ class GitlabShell parsed_args = args.map do |arg| - # Convert /~/group/project.git to group/project.git - # to make git annex path compatible with gitlab-shell - if arg =~ /\A\/~\/.*\.git\Z/ + # use full repo path + if arg =~ /\A\/.*\.git\Z/ repo_full_path else arg diff --git a/spec/gitlab_shell_spec.rb b/spec/gitlab_shell_spec.rb index 86d72f4..dd5cfb2 100644 --- a/spec/gitlab_shell_spec.rb +++ b/spec/gitlab_shell_spec.rb @@ -104,6 +104,15 @@ describe GitlabShell do File.exists?(File.join(tmp_repos_path, 'dzaporozhets/gitlab.git/annex')).should be_false end end + + context 'with git-annex and relative path without ~/' do + # Using a SSH URL on a custom port will generate /dzaporozhets/gitlab.git + let(:ssh_args) { %W(git-annex-shell inannex /dzaporozhets/gitlab.git SHA256E) } + + it 'should init git-annex' do + File.exists?(File.join(tmp_repos_path, 'dzaporozhets/gitlab.git/annex')).should be_true + end + end end end @@ -171,7 +180,7 @@ describe GitlabShell do end end - context 'no command' do + context 'no command' do after { subject.exec(nil) } it "should call api.discover" do |