Commit 52f73187 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'fix/git-annex-ssh' into 'master'

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
parents 22b36aec 55210648
Pipeline #653 skipped
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
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment