diff options
| -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 |
