Commit 8ec96837 authored by James Lopez's avatar James Lopez

get git annex to work when using custom SSH port

parent 22b36aec
...@@ -101,9 +101,8 @@ class GitlabShell ...@@ -101,9 +101,8 @@ class GitlabShell
parsed_args = parsed_args =
args.map do |arg| args.map do |arg|
# Convert /~/group/project.git to group/project.git # use full repo path
# to make git annex path compatible with gitlab-shell if arg =~ /\A\/.*\.git\Z/
if arg =~ /\A\/~\/.*\.git\Z/
repo_full_path repo_full_path
else else
arg arg
......
...@@ -104,6 +104,14 @@ describe GitlabShell do ...@@ -104,6 +104,14 @@ describe GitlabShell do
File.exists?(File.join(tmp_repos_path, 'dzaporozhets/gitlab.git/annex')).should be_false File.exists?(File.join(tmp_repos_path, 'dzaporozhets/gitlab.git/annex')).should be_false
end end
end end
context 'git annex SSH custom port issue' do
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
end end
...@@ -171,7 +179,7 @@ describe GitlabShell do ...@@ -171,7 +179,7 @@ describe GitlabShell do
end end
end end
context 'no command' do context 'no command' do
after { subject.exec(nil) } after { subject.exec(nil) }
it "should call api.discover" do 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